Merge pull request #664 from nhsconnect/samesite-policy-changes #1434
This file contains 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 app and db on checkin | |
on: | |
push: | |
paths: | |
- 'modules/api/**' | |
- 'modules/end-user/**' | |
- '.github/**' | |
env: | |
DB_HOST: localhost | |
DB_USERNAME: postgres | |
DB_PASSWORD: postgres | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:12.14 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: gpconnect | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Print the current branch name | |
run: echo "$GITHUB_REF" | |
- name: Check out branch | |
uses: actions/checkout@main | |
- name: Set up dotnet | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Build dotnet api solution | |
run: dotnet build modules/api/gpconnect-appointment-checker.api.sln | |
- name: Build dotnet end user solution | |
run: dotnet build modules/end-user/gpconnect-appointment-checker.sln | |
- name: Check Postgres running | |
run: PGPASSWORD=postgres psql -U postgres -d postgres -h localhost -c "SELECT version()" | |
- name: Build docker api application image | |
run: docker build -t gpconnect-appointment-checker-api-application modules/api/. | |
- name: Build docker end user application image | |
run: docker build -t gpconnect-appointment-checker-end-user-application modules/end-user/. | |
- name: Build docker database patcher image | |
run: docker build -t gpconnect-appointment-checker-dbpatcher database/. | |
- name: Run docker database patcher image | |
run: docker run --rm --network="host" gpconnect-appointment-checker-dbpatcher -url=jdbc:postgresql://localhost/gpconnect -user=postgres -password=postgres -locations=filesystem:sql,filesystem:sql-tests migrate |