ci:remove javadoc and move IM stage to the end (#15624) #28197
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
name: Test | |
env: | |
# This is to make sure Maven don't timeout fetching dependencies. See: https://github.com/actions/virtual-environments/issues/1499 | |
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=125 | |
on: [ pull_request ] | |
concurrency: | |
group: ${{ github.workflow}}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Cache maven artifacts | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Test core | |
run: mvn --threads 2C clean install -Pdefault -Pjdk8 --update-snapshots -f ./dhis-2/pom.xml -pl -dhis-web-embedded-jetty | |
- name: Test dhis-web | |
run: mvn --threads 2C clean install -Pdefault -Pjdk8 --update-snapshots -f ./dhis-2/dhis-web/pom.xml | |
- name: Generate surefire aggregate report | |
run: mvn surefire-report:report-only -Daggregate=true --batch-mode --no-transfer-progress -f ./dhis-2/pom.xml -pl -dhis-web-embedded-jetty | |
# tar due to https://github.com/actions/upload-artifact/blob/3cea5372237819ed00197afe530f5a7ea3e805c8/README.md?plain=1#L254 | |
- name: Tar surefire individual reports | |
run: find . -name "surefire-reports" -type d -exec find {} -type f -name "*.xml" -printf '%p\0' \; | tar --null --files-from=- -cvf surefire_reports.tar | |
- name: Archive surefire reports | |
uses: actions/upload-artifact@v3 | |
with: | |
name: unit-test-surefire-reports | |
path: | | |
dhis-2/target/site/surefire-report.html | |
surefire_reports.tar | |
retention-days: 5 | |
integration-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Cache maven artifacts | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Run integration tests | |
run: mvn --threads 2C clean install -Pintegration -Pjdk8 -f ./dhis-2/pom.xml -pl -dhis-web-embedded-jetty | |
- name: Generate surefire aggregate report | |
run: mvn surefire-report:report-only -Daggregate=true --batch-mode --no-transfer-progress -f ./dhis-2/pom.xml -pl -dhis-web-embedded-jetty | |
# tar due to https://github.com/actions/upload-artifact/blob/3cea5372237819ed00197afe530f5a7ea3e805c8/README.md?plain=1#L254 | |
- name: Tar surefire individual reports | |
run: find . -name "surefire-reports" -type d -exec find {} -type f -name "*.xml" -printf '%p\0' \; | tar --null --files-from=- -cvf surefire_reports.tar | |
- name: Archive surefire reports | |
uses: actions/upload-artifact@v3 | |
with: | |
name: integration-test-surefire-reports | |
path: | | |
dhis-2/target/site/surefire-report.html | |
surefire_reports.tar | |
retention-days: 5 |