Skip to content

Commit

Permalink
ci: run dependency check during verify
Browse files Browse the repository at this point in the history
so it only runs once on GH and not during 'mvn test'. It will
run after the package phase.

Therefore change the run-api-tests to run 'mvn verify'. We run 'mvn
install' on Jenkins.
  • Loading branch information
teleivo committed Oct 10, 2024
1 parent 4972b23 commit f1a81df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run-api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ jobs:
if [ "$DOCKERHUB_PUSH" = "true" ]; then
# build and publish multi-arch images using Jib. Image is used for api tests in
# this workflow and can be pulled from Dockerhub by devs to run locally, ...
mvn clean package --threads 2C --batch-mode --no-transfer-progress \
mvn clean verify --threads 2C --batch-mode --no-transfer-progress \
-DskipTests -Dmaven.test.skip=true --update-snapshots --file dhis-2/pom.xml \
--projects dhis-web-server --also-make --activate-profiles jibBuild \
-Djib.to.image=$CORE_IMAGE_NAME -Djib.container.labels=DHIS2_BUILD_REVISION=${{github.event.pull_request.head.sha}},DHIS2_BUILD_BRANCH=${{github.head_ref}}
else
# only build image for running api tests in this workflow i.e. master, 2.39, ...
mvn clean package --threads 2C --batch-mode --no-transfer-progress \
mvn clean verify --threads 2C --batch-mode --no-transfer-progress \
-DskipTests -Dmaven.test.skip=true --update-snapshots --file dhis-2/pom.xml \
--projects dhis-web-server --also-make --activate-profiles jibDockerBuild \
-Djib.to.image=$CORE_IMAGE_NAME
Expand Down
2 changes: 0 additions & 2 deletions dhis-2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2368,10 +2368,8 @@ jasperreports.version=${jasperreports.version}
<goals>
<goal>analyze-only</goal>
</goals>
<phase>process-test-classes</phase>
<configuration>
<failOnWarning>true</failOnWarning>
<skip>${skipTests}</skip>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit f1a81df

Please sign in to comment.