mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2026-09-16 18:12:54 +00:00
ACS-11937 Improve CI tests jobs workflow (#1280)
This commit is contained in:
+29
-14
@@ -40,14 +40,29 @@ jobs:
|
||||
steps:
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v9.3.1
|
||||
|
||||
test_run_check:
|
||||
name: "Test run check"
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
tests: ${{ steps.check.outputs.tests }}
|
||||
steps:
|
||||
- id: check
|
||||
run: |
|
||||
echo "tests=true" >> "$GITHUB_OUTPUT"
|
||||
if: >
|
||||
(
|
||||
(github.ref_name == 'master' || startsWith(github.ref_name, 'SP/') || startsWith(github.ref_name, 'HF/') || github.event_name == 'pull_request') &&
|
||||
!contains(github.event.head_commit.message, '[skip tests]')
|
||||
) ||
|
||||
contains(github.event.head_commit.message, '[run tests]')
|
||||
|
||||
veracode_sca:
|
||||
name: "Veracode - Source Clear Scan (SCA)"
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- pre_commit
|
||||
if: >
|
||||
github.ref_name == 'master' ||
|
||||
github.event_name == 'pull_request'
|
||||
- test_run_check
|
||||
if: needs.test_run_check.outputs.tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v9.3.1
|
||||
@@ -64,10 +79,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- pre_commit
|
||||
if: >
|
||||
(github.ref_name == 'master' || startsWith(github.ref_name, 'SP/') || startsWith(github.ref_name, 'HF/') || github.event_name == 'pull_request') &&
|
||||
github.actor != 'dependabot[bot]' &&
|
||||
!contains(github.event.head_commit.message, '[skip tests]')
|
||||
- test_run_check
|
||||
if: needs.test_run_check.outputs.tests == 'true' && github.actor != 'dependabot[bot]'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v9.3.1
|
||||
@@ -131,10 +144,9 @@ jobs:
|
||||
pmd_scan:
|
||||
name: "PMD Scan"
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
github.event_name == 'pull_request' &&
|
||||
!contains(github.event.head_commit.message, '[skip pmd]') &&
|
||||
!contains(github.event.head_commit.message, '[skip tests]')
|
||||
needs:
|
||||
- test_run_check
|
||||
if: needs.test_run_check.outputs.tests == 'true' && github.event_name == 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v9.3.1
|
||||
@@ -148,9 +160,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- pre_commit
|
||||
if: >
|
||||
github.ref_name == 'master' &&
|
||||
github.event_name != 'pull_request'
|
||||
- test_run_check
|
||||
if: needs.test_run_check.outputs.tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v9.3.1
|
||||
@@ -186,6 +197,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- pre_commit
|
||||
- test_run_check
|
||||
if: needs.test_run_check.outputs.tests == 'true'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -243,6 +256,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- pre_commit
|
||||
- test_run_check
|
||||
if: needs.test_run_check.outputs.tests == 'true'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
||||
Reference in New Issue
Block a user