Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ jobs:
- name: Run unit tests
run: mvn clean test --threads 2C --batch-mode --no-transfer-progress --update-snapshots --file ./dhis-2/pom.xml --activate-profiles unit-test
timeout-minutes: 30
- name: Run dependency analysis
run: mvn dependency:analyze --file ./dhis-2/pom.xml
timeout-minutes: 2
- name: Report coverage to codecov
uses: codecov/codecov-action@v3
with:
Expand Down Expand Up @@ -75,6 +72,24 @@ jobs:
surefire_reports.tar
retention-days: 5

# dependency:analyze used to run inside unit-test, but the goal forks its own build up
# to test-compile, so it bolted a second full reactor compile onto the unit-test job
# (~1m35s) for a check unrelated to unit tests. It runs here in its own job instead, in
# parallel and off the critical path, with the same fail-on-warning behaviour.
dependency-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: 17
distribution: temurin
cache: maven
- name: Run dependency analysis
run: mvn dependency:analyze --threads 2C --batch-mode --no-transfer-progress --update-snapshots --file ./dhis-2/pom.xml
timeout-minutes: 10

# The integration-test suite is the slowest part of CI, so it is split across a
# matrix of shards that run in parallel, each on its own runner with its own
# Testcontainers Postgres. Each shard runs a disjoint, interleaved slice of the
Expand Down Expand Up @@ -253,7 +268,7 @@ jobs:
contains(needs.*.result, 'failure') &&
github.ref == 'refs/heads/master'

needs: [unit-test, integration-test, integration-h2-test]
needs: [unit-test, integration-test, integration-h2-test, dependency-analysis]
steps:
- uses: rtCamp/action-slack-notify@v2
env:
Expand Down
Loading