Dev federated query performance improvement merge request #220
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
# | |
# Runs all the unit tests within the JPS Base Lib project. | |
# | |
# Author: Michael Hillman (mdhillman<@>cmclinnovations.com) | |
# | |
name: Run JPS Base Lib tests | |
# Trigger this workflow during pull requests to the 'main' | |
# branch, but ONLY when files within the library are changed. | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- JPS_BASE_LIB/** | |
- .github/workflows/base-lib_test.yml | |
# Job definitions | |
jobs: | |
# Single job to build the EmailAgent and run its tests | |
test-base-lib: | |
# Run on latest version of Ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Produce a valid 'settings.xml' file for Maven by | |
# running a script to inject the environment variables | |
# provided by GitHub secrets | |
- name: Set up Maven credentials | |
working-directory: ./.github/scripts | |
env: | |
MAVEN_USERNAME: ${{github.actor}} | |
MAVEN_PASSWORD: ${{github.token}} | |
run: | | |
chmod +x set-maven-credentials.sh | |
./set-maven-credentials.sh ../../JPS_BASE_LIB | |
# Set up JDK 11 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: "11" | |
distribution: "adopt" | |
cache: "maven" | |
# Build the code without test | |
- name: Build code (no tests) | |
working-directory: ./JPS_BASE_LIB | |
run: mvn -s settings.xml -DskipTests package | |
# Run all tests (even if some fail) | |
- name: Run all tests | |
working-directory: ./JPS_BASE_LIB | |
run: mvn -s settings.xml -Dmaven.test.failure.ignore=true test | |
# Produce test report | |
- name: Test report | |
uses: dorny/test-reporter@v1 | |
if: always() | |
with: | |
name: Test results | |
path: ./JPS_BASE_LIB/target/surefire-reports/*.xml | |
reporter: java-junit | |
fail-on-error: true |