ci: Parallelise integration test suite
* Rework actions to remove some workarounds/hacks
* Ensure that test capture statistics are accurate
* Parallelise test suites, and hopefully clearer to understand
Fixes
MODIFY
.github/workflows/verify.yaml
.github/workflows/verify.yaml
@@ -20,17 +20,66 @@ jobs:
build-verify:
name: Verify Build
runs-on: ubuntu-latest
+ if: github.repository_owner == 'Apiman'
strategy:
matrix:
java: [ 8, 11, 15 ]
- if: github.repository_owner == 'Apiman'
+ integration-suite:
+ # Default, empty string to avoid setting
+ - name: Default configuration (JPA)
+ command: " "
+ # Servlet elasticsearch
+ - name: Servlet with Elasticsearch registry
+ command: -Dapiman-test.type=es -Dapiman.gateway-test.config=servlet-es
+ # Vert.x in-memory gateway
+ - name: Vert.x with in-memory registry
+ command: -Dapiman.gateway-test.config=vertx3-mem
+ # Vert.x elasticsearch
+ - name: Vert.x with Elasticsearch registry
+ command: -Dapiman.gateway-test.config=vertx3-es
+ # Vert.x file/static
+ - name: Vert.x with immutable file registry
+ command: -Dapiman.gateway-test.config=vertx3-file
+ # AMG (API Management Gateway / EAP)
+ - name: AMG 1
+ command: -Dapiman.gateway-test.config=amg-1
+
steps:
- name: Checkout Code
uses: actions/checkout@v2
+
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
+
+ - name: Build Project
+ run: mvn clean install -Dinvoker.skip -Dmaven.javadoc.skip=true -Dmvn.test.skip=true -DskipTests=true -T1C -B
+
+ - name: Run platform-specific integration tests ({{ matrix.integration-suite.name }})
+ run: mvn test install -Dinvoker.skip -Dmaven.javadoc.skip=true -B ${{ matrix.integration-suite.command }}
+
+ - name: Publish Test Report
+ if: ${{ always() }}
+ uses: mikepenz/action-junit-report@v2
+ with:
+ report_paths: '**/build/test-results/test/TEST-*.xml'
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+
+ publish-snapshots:
+ name: Publish master snapshot artifacts
+ runs-on: ubuntu-latest
+ if: github.ref == 'refs/heads/master' && github.repository_owner == 'Apiman'
+ needs: [ build-verify ]
+
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v2
+
+ - name: Set up JDK 8 (for deploying assets, docker builds, etc)
+ uses: actions/setup-java@v1
+ with:
+ java-version: 8
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
@@ -57,12 +106,11 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Publish Docker Images & Deploy OSSRH Snapshots
- if: github.ref == 'refs/heads/master' && matrix.java == 8
run: |
mvn -B clean package docker:build -P docker -DskipTests
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker push apiman/on-wildfly:latest
- mvn -B deploy
+ mvn -B deploy -DskipTests -Dmaven.test.skip=true
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
\ No newline at end of file

ci: Parallelise integration test suite

* Rework actions to remove some workarounds/hacks

* Ensure that test capture statistics are accurate

* Parallelise test suites, and hopefully clearer to understand

Fixes #1008