Workaround an issue where the JNDIInitializer would be called several times #705
Workflow file for this run
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
# Triggers the workflow on pull request events to the main branch | |
name: Pull Request on Main Branch | |
on: | |
pull_request: | |
branches: | |
- main | |
- "release/**" | |
paths: | |
- ".github/workflows/pull-request.yaml" | |
- ".github/workflows/build-and-push.yaml" | |
- "pom.xml" | |
- "Makefile" | |
- "config" | |
- "src/**" | |
- "acceptance_tests/**" | |
- "ci/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Build and Test Pull Request | |
if: github.repository == 'geoserver/geoserver-cloud' | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: 'maven' | |
- name: Validate source code formatting | |
run: | | |
make lint | |
- name: Test | |
run: | | |
# `make test` runs mvn verify, which includes mvn package, so no need to run `package` separatedly for the upload step below | |
make test | |
- name: Upload application jar files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: application-jars | |
path: | | |
./**/target/*-bin.jar | |
./**/target/config/ | |
retention-days: 1 | |
compression-level: 0 # no compression | |
acceptance: | |
name: Acceptance Tests | |
if: github.repository == 'geoserver/geoserver-cloud' | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
needs: test | |
strategy: | |
fail-fast: false | |
matrix: | |
catalog: [ 'datadir' ] | |
#catalog: [ 'datadir', 'pgconfig', 'jdbcconfig' ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Download application jar files | |
uses: actions/download-artifact@v4 | |
with: | |
name: application-jars | |
path: . | |
- name: Build images | |
# REPACKAGE=false avoids to re-package the apps during build-image | |
run: REPACKAGE=false make build-image | |
- name: Build acceptance tests docker image | |
run: | | |
make build-acceptance | |
- name: Install CI dependencies | |
id: installci | |
run: python3 -m pip install --user --requirement=ci/requirements.txt | |
- name: Launch ${{ matrix.catalog }} acceptance tests docker composition | |
id: start | |
run: | | |
make start-acceptance-tests-${{ matrix.catalog }} | |
- name: Run ${{ matrix.catalog }} acceptance tests | |
id: acceptance | |
run: | | |
make run-acceptance-tests-${{ matrix.catalog }} | |
- name: Print docker compose logs | |
if: always() | |
run: (cd compose && c2cciutils-docker-logs) | |
- name: Cleanup acceptance tests | |
if: always() | |
run: | | |
make clean-acceptance-tests-${{ matrix.catalog }} |