Skip to content

Commit

Permalink
ci: run unit tests on self-hosted runners
Browse files Browse the repository at this point in the history
  • Loading branch information
lenaschoenburg committed Mar 24, 2022
1 parent 53cd532 commit 7bd2953
Showing 1 changed file with 7 additions and 25 deletions.
32 changes: 7 additions & 25 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,21 @@ on:
branches: [ main ]

jobs:
project-list:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt-get -y install jq
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Get Project List
id: list-projects
run: echo "::set-output name=projects::$(mvn -Dexec.executable='echo' -Dexec.args='${project.artifactId}' exec:exec -q | jq --compact-output --raw-input [inputs])"
outputs:
matrix: ${{ steps.list-projects.outputs.projects }}
unit-tests:
needs: project-list
strategy:
fail-fast: false
matrix:
project: ${{ fromJson(needs.project-list.outputs.matrix) }}
runs-on: ubuntu-latest
runs-on: ["n1-standard-32-netssd-preempt"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- run: mvn -T1C -B -D skipTests -D skipChecks install
- run: mvn -B -D skipITs -D skipChecks verify -pl :${{ matrix.project }}
- uses: stCarolas/setup-maven@v4.3
with:
maven-version: 3.8.5
- run: mvn -T2 -B -P parallel-tests -DjunitThreadCount=8 -D skipITs -D skipChecks verify
- name: Publish Test Report
if: always()
uses: scacap/action-surefire-report@v1
with:
check_name: Unit tests for ${{ matrix.project }}
fail_if_no_tests: false
check_name: Unit Tests
fail_if_no_tests: false

0 comments on commit 7bd2953

Please sign in to comment.