mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2026-09-16 18:12:54 +00:00
Add PMD and precommit for format and license header checking. (#1017)
Use package goal as project doesn't support earlier lifecycle phases.
This commit is contained in:
@@ -35,6 +35,22 @@ env:
|
||||
GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60
|
||||
|
||||
jobs:
|
||||
pre_commit:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
java_version: ${{ env.JAVA_VERSION }}
|
||||
java_version_supported_by_repo: ${{ env.JAVA_VERSION_SUPPORTED_BY_REPO }}
|
||||
steps:
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- id: changed-files
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v7.0.0
|
||||
with:
|
||||
write-list-to-env: true
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v7.0.0
|
||||
|
||||
veracode_sca:
|
||||
name: "Veracode - Source Clear Scan (SCA)"
|
||||
runs-on: ubuntu-latest
|
||||
@@ -119,6 +135,21 @@ jobs:
|
||||
name: Veracode Pipeline-Scan Results (Human Readable)
|
||||
path: readable_output.zip
|
||||
|
||||
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]')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- uses: Alfresco/ya-pmd-scan@v4.1.0
|
||||
with:
|
||||
classpath-build-command: "mvn -ntp package -DskipTests"
|
||||
|
||||
build_and_test:
|
||||
name: "Core & Base Snapshot deployment"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user