This is an automated email from the ASF dual-hosted git repository.
joewitt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 6b8c19c761 NIFI-13160 Support Skipping Frontend Unit Tests This closes
#8757
6b8c19c761 is described below
commit 6b8c19c7617be7d49534064c65b95c188d08759f
Author: exceptionfactory <[email protected]>
AuthorDate: Mon May 6 16:24:08 2024 -0500
NIFI-13160 Support Skipping Frontend Unit Tests
This closes #8757
- Added frontend.skipTests property to nifi-web-frontend Maven
configuration with default value of false
- Configured lint and unit-test execution goals to depend on
frontend.skipTests
- Added paths-filter GitHub Actions step for conditional enabling of
frontend tests
Signed-off-by: Joseph Witt <[email protected]>
---
.github/workflows/ci-workflow.yml | 26 ++++++++++++++++++++++
.../nifi-web/nifi-web-frontend/pom.xml | 3 +++
2 files changed, 29 insertions(+)
diff --git a/.github/workflows/ci-workflow.yml
b/.github/workflows/ci-workflow.yml
index c5a9a02ce5..4706624bd6 100644
--- a/.github/workflows/ci-workflow.yml
+++ b/.github/workflows/ci-workflow.yml
@@ -77,6 +77,7 @@ concurrency:
permissions:
security-events: write
contents: read
+ pull-requests: read
jobs:
static-analysis:
@@ -158,10 +159,18 @@ jobs:
distribution: 'corretto'
java-version: '21'
cache: 'maven'
+ - name: Evaluate Changed Paths
+ uses: dorny/paths-filter@v3
+ id: changes
+ with:
+ filters: |
+ frontend:
+ -
'nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/**'
- name: Maven Compile
env:
MAVEN_OPTS: >-
${{ env.COMPILE_MAVEN_OPTS }}
+ -Dfrontend.skipTests=${{ !steps.changes.outputs.frontend }}
run: >
${{ env.MAVEN_COMMAND }}
${{ env.MAVEN_COMPILE_COMMAND }}
@@ -169,6 +178,7 @@ jobs:
env:
MAVEN_OPTS: >-
${{ env.DEFAULT_MAVEN_OPTS }}
+ -Dfrontend.skipTests=${{ !steps.changes.outputs.frontend }}
run: >
${{ env.MAVEN_COMMAND }}
jacoco:prepare-agent
@@ -220,10 +230,18 @@ jobs:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
+ - name: Evaluate Changed Paths
+ uses: dorny/paths-filter@v3
+ id: changes
+ with:
+ filters: |
+ frontend:
+ -
'nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/**'
- name: Maven Compile
env:
MAVEN_OPTS: >-
${{ env.COMPILE_MAVEN_OPTS }}
+ -Dfrontend.skipTests=${{ !steps.changes.outputs.frontend }}
run: >
${{ env.MAVEN_COMMAND }}
${{ env.MAVEN_COMPILE_COMMAND }}
@@ -287,10 +305,18 @@ jobs:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
+ - name: Evaluate Changed Paths
+ uses: dorny/paths-filter@v3
+ id: changes
+ with:
+ filters: |
+ frontend:
+ -
'nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/**'
- name: Maven Compile
env:
MAVEN_OPTS: >-
${{ env.COMPILE_MAVEN_OPTS }}
+ -Dfrontend.skipTests=${{ !steps.changes.outputs.frontend }}
run: >
${{ env.MAVEN_COMMAND_WINDOWS }}
${{ env.MAVEN_COMPILE_COMMAND }}
diff --git
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/pom.xml
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/pom.xml
index 324e2e023c..48fd1813d9 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/pom.xml
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/pom.xml
@@ -36,6 +36,7 @@
Ex: 'purple' // will overwrite the 'material' theme file with the
'purple' theme.
-->
<frontend.theme>material</frontend.theme>
+ <frontend.skipTests>true</frontend.skipTests>
</properties>
<build>
@@ -160,6 +161,7 @@
<configuration>
<arguments>nx lint</arguments>
<workingDirectory>${frontend.working.dir}</workingDirectory>
+ <skip>${frontend.skipTests}</skip>
</configuration>
</execution>
@@ -175,6 +177,7 @@
<configuration>
<arguments>nx test --maxWorkers=2</arguments>
<workingDirectory>${frontend.working.dir}</workingDirectory>
+ <skip>${frontend.skipTests}</skip>
</configuration>
</execution>