From 7b717ab315117995e3c9559e8eb480882969d2f1 Mon Sep 17 00:00:00 2001 From: Jeromy Cannon Date: Thu, 19 Oct 2023 06:45:33 -0500 Subject: [PATCH] feat: add fullstack-gradle-plugin project to GitHub workflow (#421) Signed-off-by: Jeromy Cannon --- .github/workflows/zxc-code-analysis.yaml | 2 +- .github/workflows/zxc-compile-code.yaml | 34 +++++++++++++++++++----- .github/workflows/zxf-snyk-monitor.yaml | 2 +- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/.github/workflows/zxc-code-analysis.yaml b/.github/workflows/zxc-code-analysis.yaml index dbbb72e0b..f8acfcb97 100644 --- a/.github/workflows/zxc-code-analysis.yaml +++ b/.github/workflows/zxc-code-analysis.yaml @@ -162,7 +162,7 @@ jobs: env: SNYK_TOKEN: ${{ secrets.snyk-token }} if: ${{ inputs.enable-snyk-scan && !cancelled() && !failure() }} - run: snyk test --all-sub-projects --severity-threshold=high --json-file-output=snyk-test.json + run: snyk test --all-projects --severity-threshold=high --json-file-output=snyk-test.json - name: Snyk Code id: snyk-code diff --git a/.github/workflows/zxc-compile-code.yaml b/.github/workflows/zxc-compile-code.yaml index ae722648c..26bdb5ec2 100644 --- a/.github/workflows/zxc-compile-code.yaml +++ b/.github/workflows/zxc-compile-code.yaml @@ -170,7 +170,14 @@ jobs: gradle-version: ${{ inputs.gradle-version }} arguments: assemble --scan build-root-directory: fullstack-examples - gradle-executable: gradlew + + - name: Gradle Plugin Compile + id: gradle-build-gradle-plugin + uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0 + with: + gradle-version: ${{ inputs.gradle-version }} + arguments: assemble --scan + build-root-directory: fullstack-gradle-plugin - name: Spotless Check uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0 @@ -186,7 +193,14 @@ jobs: gradle-version: ${{ inputs.gradle-version }} arguments: spotlessCheck --scan build-root-directory: fullstack-examples - gradle-executable: gradlew + + - name: Gradle Plugin Spotless Check + uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0 + if: ${{ inputs.enable-spotless-check && steps.gradle-build-gradle-plugin.conclusion == 'success' && !cancelled() }} + with: + gradle-version: ${{ inputs.gradle-version }} + arguments: spotlessCheck --scan + build-root-directory: fullstack-gradle-plugin - name: Unit Tests id: gradle-test @@ -204,11 +218,19 @@ jobs: gradle-version: ${{ inputs.gradle-version }} arguments: check --scan build-root-directory: fullstack-examples - gradle-executable: gradlew + + - name: Gradle Plugin Unit Tests + id: gradle-test-gradle-plugin + uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0 + if: ${{ inputs.enable-unit-tests && steps.gradle-build-gradle-plugin.conclusion == 'success' && !cancelled() && !failure() }} + with: + gradle-version: ${{ inputs.gradle-version }} + arguments: check --scan + build-root-directory: fullstack-gradle-plugin - name: Publish Unit Test Report uses: actionite/publish-unit-test-result-action@1e01e49081c6c4073913aa4b7980fa83e709f322 # v2.3.0 - if: ${{ inputs.enable-unit-tests && steps.gradle-build.conclusion == 'success' && !cancelled() && !failure() }} + if: ${{ inputs.enable-unit-tests && steps.gradle-build.conclusion == 'success' && steps.gradle-build-examples.conclusion == 'success' && steps.gradle-build-gradle-plugin.conclusion == 'success' && !cancelled() && !failure() }} with: check_name: 'Unit Test Results' check_run_disabled: false @@ -219,7 +241,7 @@ jobs: # here to prevent failures if future modules are not wired properly. - name: Jacoco Coverage Report uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0 - if: ${{ inputs.enable-unit-tests && steps.gradle-build.conclusion == 'success' && !cancelled() }} + if: ${{ inputs.enable-unit-tests && steps.gradle-build.conclusion == 'success' && steps.gradle-build-examples.conclusion == 'success' && steps.gradle-build-gradle-plugin.conclusion == 'success' && !cancelled() }} with: gradle-version: ${{ inputs.gradle-version }} arguments: jacocoTestReport --scan @@ -233,7 +255,7 @@ jobs: - name: Publish Test Reports uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - if: ${{ inputs.enable-unit-tests && steps.gradle-build.conclusion == 'success' && !cancelled() }} + if: ${{ inputs.enable-unit-tests && steps.gradle-build.conclusion == 'success' && steps.gradle-build-examples.conclusion == 'success' && steps.gradle-build-gradle-plugin.conclusion == 'success' && !cancelled() }} with: name: Test Reports path: "**/build/reports/tests/**" diff --git a/.github/workflows/zxf-snyk-monitor.yaml b/.github/workflows/zxf-snyk-monitor.yaml index 34cc0b9c5..3450c0ff2 100644 --- a/.github/workflows/zxf-snyk-monitor.yaml +++ b/.github/workflows/zxf-snyk-monitor.yaml @@ -70,4 +70,4 @@ jobs: - name: Run Snyk Monitor env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - run: snyk monitor --all-sub-projects + run: snyk monitor --all-projects