Bump the npm_and_yarn group across 1 directory with 6 updates #269
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linting | |
on: | |
push: | |
branches: | |
- develop | |
- trunk | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
eslint: | |
name: eslint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: npm install | |
run: npm install | |
- name: Generate linting report | |
run: npm run lint:js -- --output-file eslint-report.json --format json | |
continue-on-error: true | |
- name: Annotate code linting results | |
uses: ataylorme/[email protected] | |
if: ${{ github.actor != 'dependabot[bot]' }} # dependabot doesn't have permissions | |
with: | |
repo-token: '${{ secrets.GITHUB_TOKEN }}' | |
report-json: 'eslint-report.json' | |
- name: Update summary | |
run: | | |
npm_config_yes=true npx github:10up/eslint-json-to-md --path ./eslint-report.json --output ./eslint-report.md | |
cat eslint-report.md >> $GITHUB_STEP_SUMMARY | |
if: ${{ failure() }} | |
phpcs: | |
name: WPCS | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: WPCS check | |
uses: 10up/wpcs-action@stable | |
with: | |
use_local_config: true | |
extra_args: '--report-json=./phpcs-report.json' | |
- name: Update summary | |
run: | | |
npx github:10up/phpcs-json-to-md --path ./phpcs-report.json --output ./phpcs-report.md | |
cat phpcs-report.md >> $GITHUB_STEP_SUMMARY | |
if: ${{ failure() }} | |
php_compatibility: | |
name: PHP minimum 7.4 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set PHP version | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
tools: composer:v2 | |
coverage: none | |
- name: Install dependencies | |
run: composer install | |
- name: Run PHP Compatibility | |
run: vendor/bin/phpcs maps-block-apple.php includes/ -p --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.4- |