Add metrics tracking for documents, projections, and subscriptions #29
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Install sqlx-cli | |
| run: cargo install sqlx-cli --no-default-features --features rustls,postgres | |
| - name: Cargo fmt | |
| run: cargo fmt -- --check | |
| - name: Cargo clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Run tests | |
| env: | |
| DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres | |
| run: | | |
| cargo test --lib --bins --examples | |
| integration: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U postgres" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Run integration tests | |
| env: | |
| DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres | |
| run: cargo test --test integration_postgres |