Skip to content

ci: bump actions/checkout from 4 to 6 #48

ci: bump actions/checkout from 4 to 6

ci: bump actions/checkout from 4 to 6 #48

Workflow file for this run

# Unique name for this workflow
name: CI
# Definition when the workflow should run
on:
workflow_dispatch:
push:
#paths-ignore:
#- "sfdx-project.json"
#- "README.md"
paths:
- 'force-app/**'
- '.github/workflows/ci.yml'
# Jobs to be executed
jobs:
format-lint:
runs-on: ubuntu-latest
steps:
# Checkout the source code
- name: 'Checkout source code'
uses: actions/checkout@v6
# Cache node_modules to speed up the process
- name: 'Restore node_modules cache'
id: cache-npm
uses: actions/cache@v4
with:
path: node_modules
key: npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-${{ env.cache-name }}-
npm-
# Install npm dependencies for Prettier and Jest
- name: 'Install npm dependencies'
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci
# Prettier formatting
- name: 'Code formatting verification with Prettier'
run: npm run prettier:verify:apex
pmd-analysis:
runs-on: ubuntu-latest
#needs: format-lint-apex-lwc
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
# Checkout the source code
- name: 'Checkout source code'
uses: actions/checkout@v6
# Install PMD
- name: 'Install PMD'
run: |
PMD_VERSION=$(curl -s https://api.github.com/repos/pmd/pmd/releases/latest | grep '.tag_name' | sed 's:.*/::' | sed 's:",::')
wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F$PMD_VERSION/pmd-dist-$PMD_VERSION-bin.zip
unzip pmd-dist-$PMD_VERSION-bin.zip -d ~
mv ~/pmd-bin-$PMD_VERSION ~/pmd
~/pmd/bin/pmd --version
# Run PMD scan
- name: 'Run PMD scan'
run: ~/pmd/bin/pmd check --dir force-app --rulesets pmd/ruleset.xml --format text --cache pmd/cache --minimum-priority "Medium Low"