This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
Update README.md #245
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: Code check workflows | |
on: | |
workflow_dispatch: | |
push: | |
branches: [release, next] | |
pull_request: | |
types: [opened, reopened, ready_for_review, synchronize] | |
# Down scope as necessary via https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token | |
permissions: | |
checks: write | |
contents: write | |
jobs: | |
run-linters: | |
name: Run linters | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: 'cache' | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.yarn | |
~/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- run: yarn install --immutable | |
# Install your linters here | |
- name: Save Code Linting Report JSON | |
# npm script for ESLint | |
# eslint --output-file eslint_report.json --format json src | |
# See https://eslint.org/docs/user-guide/command-line-interface#options | |
run: yarn lint:report --quiet | |
# Continue to the next step even if this fails | |
continue-on-error: true | |
- name: Annotate Code Linting Results | |
uses: ataylorme/[email protected] | |
with: | |
repo-token: '${{ secrets.GITHUB_TOKEN }}' | |
report-json: 'eslint_report.json' | |
- name: Upload ESLint report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: eslint_report.json | |
path: eslint_report.json |