Update all patch dependencies #117
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
| name: Server | |
| on: | |
| # push: | |
| # branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - ".github/workflows/server.yml" | |
| - "server/crates/**" | |
| - "server/src/**" | |
| - "server/.cargo/**" | |
| - "server/Cargo.toml" | |
| - "server/Cargo.lock" | |
| - "server/build.rs" | |
| - "server/rust-toolchain.toml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| # Disable incremental compilation | |
| CARGO_INCREMENTAL: 0 | |
| # Disable debuginfo | |
| CARGO_TERM_COLOR: always | |
| RUSTC_WRAPPER: "sccache" | |
| SCCACHE_GHA_ENABLED: "true" | |
| RUSTFLAGS: "-W warnings" | |
| jobs: | |
| rust: | |
| name: Rust | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: server | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 | |
| with: | |
| persist-credentials: false | |
| - uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10 | |
| - name: Cache Cargo downloads | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('server/Cargo.lock') }} | |
| - name: Check format | |
| run: cargo fmt --check | |
| - name: Clippy | |
| run: cargo clippy --quiet | |
| - name: Build test | |
| run: cargo test --no-run | |
| - name: Run test | |
| run: cargo test --quiet | |
| integration-test: | |
| name: Integration Test | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: server | |
| needs: rust | |
| env: | |
| TEST_DATABASE_URL: postgres://testuser:testpass@127.0.0.1:55432/testdb | |
| TEST_REDIS_URL: redis://127.0.0.1:56379 | |
| TEST_DB_PORT: 55432 | |
| TEST_REDIS_PORT: 56379 | |
| services: | |
| postgres: | |
| image: postgres:18-alpine | |
| env: | |
| POSTGRES_USER: testuser | |
| POSTGRES_PASSWORD: testpass | |
| POSTGRES_DB: testdb | |
| ports: | |
| - 55432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U testuser -d testdb" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 12 | |
| redis: | |
| image: valkey/valkey:9-alpine | |
| ports: | |
| - 56379:6379 | |
| options: >- | |
| --health-cmd "valkey-cli ping" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 12 | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 | |
| with: | |
| persist-credentials: false | |
| - uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10 | |
| - name: Cache Cargo downloads | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('server/Cargo.lock') }} | |
| - name: Run integration test | |
| run: cargo test --quiet --features integration-test |