Update dependency org.liquibase:liquibase-core to v4.28.0 #23387
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 ANET | |
on: | |
push: | |
branches: | |
- '**' | |
tags: | |
- '**' | |
pull_request: | |
branches: | |
- main | |
env: | |
NODE_OPTIONS: '--max-old-space-size=8192' | |
DB_DRIVER: postgresql | |
jobs: | |
build: | |
name: Build with Gradle | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/build-cache | |
- run: ./gradlew check -x test | |
- run: ./gradlew prettierCheck | |
- run: ./gradlew yarn_run_lint | |
- run: ./gradlew jar | |
test-init: | |
needs: build | |
name: Test ANET init | |
runs-on: ubuntu-latest | |
env: | |
ANET_ADMIN_ORG_NAME: "ACME Administrators Inc." | |
ANET_ADMIN_POS_NAME: "The ANET admin" | |
ANET_ADMIN_FULL_NAME: "DOE, John" | |
ANET_ADMIN_DOMAIN_USERNAME: "johndoe" | |
ANET_CONFIG: "anet-test.yml" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/build-cache | |
- run: ./gradlew -PtestEnv dockerCreateDB dockerStartDB | |
- run: | | |
echo "testMode: true" | | |
cat - anet.yml > ${ANET_CONFIG} | |
- run: ./gradlew -PtestEnv dbWait | |
# This step should fail: | |
- name: Run ANET init on empty database | |
id: init-on-empty-db | |
run: ./gradlew -PtestEnv dbInit | |
continue-on-error: true | |
- run: exit 1 | |
if: ${{ steps.init-on-empty-db.outcome != 'failure' }} | |
# This step should succeed: | |
- name: Run ANET init on clean database | |
id: init-on-clean-db | |
run: ./gradlew -PtestEnv dbMigrate dbInit | |
# This step should fail: | |
- name: Run ANET init on filled database | |
id: init-on-filled-db | |
run: ./gradlew -PtestEnv dbInit | |
continue-on-error: true | |
- run: exit 1 | |
if: ${{ steps.init-on-filled-db.outcome != 'failure' }} | |
test-server: | |
needs: build | |
name: Server tests; ${{ matrix.dictionary }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
dictionary: [anet-dictionary.yml, testDictionaries/no-custom-fields.yml] | |
env: | |
ANET_DICTIONARY_NAME: ${{ matrix.dictionary }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/build-cache | |
- run: | | |
rm -rf client/build/test-results | |
mkdir -p client/build/test-results | |
- run: ./gradlew -PtestEnv dockerCreateDB dockerStartDB | |
- run: ./gradlew -PtestEnv dockerConfigureKeycloak dockerStartKeycloak | |
- run: ./gradlew -PtestEnv dockerCreateFakeSmtpServer dockerStartFakeSmtpServer | |
- run: ./gradlew -PtestEnv dbWait dbMigrate dbLoad | |
- run: ./gradlew -PtestEnv test jacocoTestReport | |
- run: ./gradlew yarn_run_server-junit-merge | |
- name: Strip slashes from dictionary name | |
id: strip-slashes | |
run: echo "dictionary=${ANET_DICTIONARY_NAME//\//_}" >> $GITHUB_OUTPUT | |
if: always() | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: server-test-results for ${{ steps.strip-slashes.outputs.dictionary }} | |
path: client/build/test-results/server-test-results.xml | |
if: always() | |
test-client: | |
needs: build | |
name: Client tests; ${{ matrix.client-tests }}, ${{ matrix.dictionary }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
dictionary: [anet-dictionary.yml] | |
client-tests: [jest, wdio-junit, e2e-junit] | |
include: | |
- dictionary: testDictionaries/no-custom-fields.yml | |
client-tests: wdio-noCF-junit | |
env: | |
ANET_DICTIONARY_NAME: ${{ matrix.dictionary }} | |
CLIENT_TESTS: ${{ matrix.client-tests }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/build-cache | |
- run: | | |
rm -rf client/build/test-results | |
mkdir -p client/build/test-results | |
- run: ./gradlew -PtestEnv dockerCreateDB dockerStartDB | |
- run: ./gradlew -PtestEnv dockerConfigureKeycloak dockerStartKeycloak | |
- run: ./gradlew -PtestEnv dockerCreateFakeSmtpServer dockerStartFakeSmtpServer | |
- run: ./gradlew -PtestEnv dbWait dbMigrate dbLoad | |
- run: | | |
./gradlew -PtestEnv run & | |
sleep 15 | |
- uses: olegtarasov/get-tag@2.1.3 | |
id: tagName | |
- name: Set local identifier for BrowserStack | |
id: browserstack-local | |
run: echo "identifier=github-${GITHUB_RUN_ID}-${DB_DRIVER}-${CLIENT_TESTS}" >> $GITHUB_OUTPUT | |
- run: ./gradlew yarn_run_test-${CLIENT_TESTS} | |
env: | |
GIT_TAG_NAME: ${{ steps.tagName.outputs.tag }} | |
BROWSERSTACK_LOCAL_IDENTIFIER: ${{ steps.browserstack-local.outputs.identifier }} | |
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | |
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }} | |
- run: head -1000 logs/clientLog.log | |
if: always() | |
- name: Strip slashes from dictionary name | |
id: strip-slashes | |
run: echo "dictionary=${ANET_DICTIONARY_NAME//\//_}" >> $GITHUB_OUTPUT | |
if: always() | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.client-tests }}-test-results for ${{ steps.strip-slashes.outputs.dictionary }} | |
path: client/build/test-results/${{ matrix.client-tests }}-test-results.xml | |
if: always() |