Style updates #48
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: ESLint | |
on: | |
push: | |
branches: [ master, main ] | |
pull_request: | |
branches: [ master, main ] | |
jobs: | |
eslint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: npm ci # instead of install to ensure consistency and determinism in CI/CD workflow | |
- name: Run ESLint | |
run: npm run lint | |
- name: Cache node modules and eslintrc.js | |
uses: actions/cache@v2 | |
with: | |
path: | | |
node_modules | |
.eslintrc.js | |
# Modify cache keys for restoration | |
key: ${{ runner.os }}-eslintrc-${{ hashFiles('.eslintrc.js') }}-node-modules-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-eslintrc- ${{ runner.os }}-node-modules- |