Merge pull request #216 from 10up/bump/wp-version #193
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: JS Lint | |
on: | |
push: | |
branches: | |
- develop | |
- trunk | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
jslint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use desired version of NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- 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/eslint-annotate-action@1.2.0 | |
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() }} |