clippy and sqlx prepare #244
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: push | |
| name: Rust pre-merge checks | |
| env: | |
| DATABASE_URL: "postgres://postgres@postgres/clusterizer" | |
| jobs: | |
| rust-checks: | |
| runs-on: ubuntu-latest | |
| container: rust:bookworm | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_HOST_AUTH_METHOD: trust | |
| POSTGRES_DB: clusterizer | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: sqlx install | |
| run: cargo install sqlx-cli | |
| - name: rustup install clippy | |
| run: rustup component add clippy rustfmt | |
| - name: sqlx setup database | |
| run: sqlx database setup | |
| working-directory: ./server | |
| - name: Clippy Check | |
| run: cargo clippy -- -D warnings | |
| - name: Cargo Format Check | |
| run: cargo fmt --check | |
| - name: Sqlx Prepare Check | |
| run: cargo sqlx prepare --check | |
| working-directory: ./server |