update e2e multi db test for retry interval #42
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: Build | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| all-go: | |
| name: All Systems Go | |
| runs-on: ubuntu-latest | |
| needs: | |
| - rustfmt | |
| - clippy | |
| - test | |
| - coverage | |
| - migrations | |
| - multi-database-integration | |
| - evaluator-wasm | |
| - web | |
| steps: | |
| - run: exit 0 | |
| rustfmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt | |
| - run: cargo +nightly fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - run: cargo clippy --workspace --all-targets --locked -- -D warnings | |
| test: | |
| name: Test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - run: cargo test --workspace --locked --verbose | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Generate Rust coverage report | |
| run: cargo llvm-cov --workspace --locked --lcov --output-path lcov.info | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: lcov.info | |
| flags: rust | |
| name: rust-workspace | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| migrations: | |
| name: Migrations | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: agent_vigilo | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U postgres -d agent_vigilo" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| DATABASE_URL: postgresql://postgres:password@localhost:5432/agent_vigilo | |
| MESSAGING_URL: amqp://guest:guest@localhost:5672 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - run: cargo run --quiet -p vigilo --locked -- setup --skip-evaluators | |
| env: | |
| RUSTFLAGS: -Awarnings | |
| multi-database-integration: | |
| name: Multi-Database Integration | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres-primary: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: agent_vigilo | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U postgres -d agent_vigilo" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| postgres-shard: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: agent_vigilo | |
| ports: | |
| - 5433:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U postgres -d agent_vigilo" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| rabbitmq: | |
| image: rabbitmq:3-management | |
| env: | |
| RABBITMQ_DEFAULT_USER: guest | |
| RABBITMQ_DEFAULT_PASS: guest | |
| ports: | |
| - 5672:5672 | |
| options: >- | |
| --health-cmd "rabbitmq-diagnostics -q ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| --health-start-period 20s | |
| env: | |
| DATABASE_URL: postgresql://postgres:password@localhost:5432/agent_vigilo | |
| VIGILO_TEST_SHARD_001_DATABASE_URL: postgresql://postgres:password@localhost:5433/agent_vigilo | |
| MESSAGING_URL: amqp://guest:guest@localhost:5672 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-wasip2 | |
| - run: cargo build -p sentiment-basic-en --target wasm32-wasip2 --release --locked | |
| - run: cargo test -p vigilo --locked --test multi_database_routing -- --nocapture | |
| - run: cargo test -p vigilo --locked --test multi_database_e2e -- --nocapture | |
| env: | |
| VIGILO_E2E_MULTI_DATABASE: "1" | |
| evaluator-wasm: | |
| name: Evaluator Wasm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-wasip2 | |
| - run: cargo build -p sentiment-basic-en --target wasm32-wasip2 --release --locked | |
| web: | |
| name: Web | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: web | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: web/package-lock.json | |
| - run: npm ci | |
| - run: npm run typecheck | |
| - run: npm run build |