Skip to content

[EPAC-2062]: build Hansard search index Lambda #27

[EPAC-2062]: build Hansard search index Lambda

[EPAC-2062]: build Hansard search index Lambda #27

Workflow file for this run

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
- members
- sittings
- bills
- member-speeches
- member-speeches-publisher
- member-votes
- member-votes-publisher
- on-this-day
- estimates
- health
- 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:
go-version-file: backend/${{ matrix.service }}/go.mod
- 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 ./...