[EPAC-2303]: Relocate ComputeBillVersionDiff policy to bills-indexer use-case layer #132
Workflow file for this run
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: Backend PR | |
| on: | |
| pull_request: | |
| paths: | |
| - 'backend/**' | |
| - 'docs/architecture/use-case-catalog.md' | |
| - 'scripts/ci/check_catalog_drift.sh' | |
| - 'scripts/ci/check_go_dependency_rule.sh' | |
| - '.github/workflows/backend-pr.yml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: backend-pr-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| architecture: | |
| name: Architecture enforcement | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Backend Dependency Rule | |
| run: scripts/ci/check_go_dependency_rule.sh | |
| - name: Catalog drift | |
| run: scripts/ci/check_catalog_drift.sh | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| service: | |
| - _shared | |
| - member-content | |
| - member-lobbying | |
| - members | |
| - members-indexer | |
| - sittings | |
| - bills | |
| - bills-indexer | |
| - member-speeches | |
| - member-speeches-publisher | |
| - member-votes | |
| - member-votes-publisher | |
| - on-this-day | |
| - estimates | |
| - health | |
| - lobbying | |
| - lobbying-index | |
| - riding-boundary | |
| - calendar | |
| - config | |
| - hansard-subjects-index | |
| - hansard-search-index | |
| - manifest | |
| - openapi | |
| - members-publisher | |
| - sittings-publisher | |
| - bills-publisher | |
| name: Test ${{ matrix.service }} | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: epac | |
| POSTGRES_PASSWORD: epac | |
| POSTGRES_DB: epac_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| # Pin to the workspace toolchain so go.work (go 1.25.3) does not force a | |
| # runtime toolchain swap, which breaks coverage with `no such tool "covdata"`. | |
| go-version-file: backend/go.work | |
| - name: Unit tests | |
| working-directory: backend/${{ matrix.service }} | |
| run: go test -coverprofile=coverage.out ./... && go tool cover -func=coverage.out | |
| - name: Integration tests | |
| working-directory: backend/${{ matrix.service }} | |
| env: | |
| DATABASE_URL: postgresql://epac:epac@localhost:5432/epac_test?sslmode=disable | |
| run: go test -tags=integration ./... |