Skip to content

Commit

Permalink
Try running the integration (failsafe) tests during a single-stage wh…
Browse files Browse the repository at this point in the history
…ile omitting surefire (unit) tests
  • Loading branch information
ChrisSamo632 committed Oct 8, 2023
1 parent e717b53 commit da00ccf
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 19 deletions.
35 changes: 16 additions & 19 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,15 @@ env:
-ff
# skip assemblies and modules covered separately by the system-tests workflow
# skip unit tests (surefire), run integration tests (failsafe), python ITs included as part of the system-tests workflow
MAVEN_BUILD_ARGUMENTS: >-
-D skipTests
-T 2.0C
install
-D failsafe.failIfNoSpecifiedTests=false
package
-P skip-unit-tests
-P integration-tests
-P nifi-registry-integration-tests
package
MAVEN_BUILD_EXCLUDE_PROJECTS: >-
-pl -:minifi-assembly
-pl -:minifi-c2-assembly
Expand All @@ -70,15 +75,6 @@ env:
-pl -:nifi-system-test-suite
-pl -:nifi-nar-provider-assembly
-pl -:nifi-py4j-integration-tests
# run integration tests, python ITs included as part of the system-tests workflow
MAVEN_FAILSAFE_RUN_ARGUMENTS: >-
-D failsafe.failIfNoSpecifiedTests=false
test-compile
failsafe:integration-test
failsafe:verify
-P integration-tests
-P nifi-registry-integration-tests
# skip individual failing ITs (some won't work in a CI environment)
# always run the (failsafe default) IT*, *IT, *ITCase integration-tests
MAVEN_FAILSAFE_SKIP_ITS: >-
Expand Down Expand Up @@ -227,22 +223,23 @@ jobs:
- name: Confirm Docker
run: id && docker info

- name: Build Modules
- name: Build and Run Tests
env:
MAVEN_OPTS: >-
${{ env.DEFAULT_MAVEN_OPTS }}
run: >
${{ env.MAVEN_COMMAND }}
${{ env.MAVEN_BUILD_ARGUMENTS }}
${{ env.MAVEN_BUILD_EXCLUDE_PROJECTS }}
- name: Run Failsafe Tests
env:
MAVEN_OPTS: >-
${{ env.DEFAULT_MAVEN_OPTS }}
run: >
${{ env.MAVEN_COMMAND }}
${{ env.MAVEN_FAILSAFE_RUN_ARGUMENTS }}
'-Dit.test=${{ env.MAVEN_FAILSAFE_SKIP_ITS }}'
# - name: Run Failsafe Tests
# env:
# MAVEN_OPTS: >-
# ${{ env.DEFAULT_MAVEN_OPTS }}
# run: >
# ${{ env.MAVEN_COMMAND }}
# ${{ env.MAVEN_FAILSAFE_RUN_ARGUMENTS }}
# '-Dit.test=${{ env.MAVEN_FAILSAFE_SKIP_ITS }}'
- name: Upload Troubleshooting Logs
if: failure() || cancelled()
uses: actions/upload-artifact@v3
Expand Down
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,25 @@
</plugins>
</build>
</profile>
<profile>
<!--
Disabled Unit Tests executed through the surefire plugin. Intended to be used
alongside the integration-tests profile to run *only* the tests configured for
execution through the failsafe plugin
-->
<id>skip-unit-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>contrib-check</id>
<build>
Expand Down

0 comments on commit da00ccf

Please sign in to comment.