Skip to content

[BRMO-379] [BRMO-332] [BRMO-381] Aanpassingen aan BRK datamodel en BAG/BRK combinatieviews #3202

[BRMO-379] [BRMO-332] [BRMO-381] Aanpassingen aan BRK datamodel en BAG/BRK combinatieviews

[BRMO-379] [BRMO-332] [BRMO-381] Aanpassingen aan BRK datamodel en BAG/BRK combinatieviews #3202

Workflow file for this run

name: 'PostgreSQL Database Upgrade'
on:
push:
branches:
- 'master'
pull_request:
concurrency: # cancel on PR pushes
# More info: https://stackoverflow.com/a/68422069/253468
group: ${{ github.workflow }}-${{ ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release' ) && format('ci-master-{0}', github.sha) || format('ci-master-{0}', github.ref) }}
cancel-in-progress: true
env:
MAVEN_OPTS: -Djava.awt.headless=true -Xms8G -Xmx12G -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 -Dtest.persistence.unit=brmo.persistence.postgresql
PGPASSWORD: postgres
PGUSER: postgres
PGDATABASE: postgres
MAVEN_VERSION: '3.9.9'
jobs:
build:
name: PostGIS ${{ matrix.postgis }}
runs-on: ubuntu-22.04
strategy:
matrix:
postgis: [ 13-3.4 ]
services:
postgres:
image: postgis/postgis:${{ matrix.postgis }}
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 15s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Cache test data en laatste release
uses: actions/cache@v4
with:
path: ~/downloads
key: downloads-${{ hashFiles('**/pom.xml') }}
restore-keys: |
downloads-
- name: 'Set up JDK'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: 'Set up Maven'
uses: stCarolas/setup-maven@v5
with:
maven-version: ${{ env.MAVEN_VERSION }}
- name: 'datamodel Priming build'
run: mvn clean install -Dmaven.test.skip=true -Ddocker.skip=true -Dtest.onlyITs= -B -V -fae -pl 'datamodel' -am -DskipQA=true
- name: 'Get last release'
run: |
.build/ci/getlastRelease.sh
- name: 'Set up PostgreSQL'
run: |
psql --version
psql -U postgres -h localhost -c 'SELECT version();'
.build/ci/pgsql-create-databases.sh
.build/ci/pgsql-setup-previous.sh
- name: 'Upgrade databases'
run: |
.build/ci/pgsql-execute-upgrades.sh staging
.build/ci/pgsql-execute-upgrades.sh rsgb
.build/ci/pgsql-execute-upgrade-extras.sh rsgb
.build/ci/pgsql-execute-upgrades.sh rsgbbgt
.build/ci/pgsql-execute-upgrades.sh bag
.build/ci/pgsql-execute-upgrades.sh brk
- name: 'Test'
run: |
mvn -e -B -Ppostgresql -pl 'datamodel' resources:testResources compiler:testCompile surefire:test -Dtest='*UpgradeTest' -Ddatabase.upgrade=true -DskipQA=true
- name: 'Upload coverage to Codecov'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: 'Cleanup build artifacts'
run: |
mvn clean build-helper:remove-project-artifact
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {}