Logging Adjustments / Dependency Audit 2023-09-08 #220
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: Lint | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
linting: | |
name: Linting Code | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Code Checkout | |
uses: actions/checkout@v4 | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Cache NPM | |
id: cache-npm | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.npm | |
./node_modules | |
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: ${{ runner.os }}-npm- | |
- name: Install Dependencies | |
if: steps.cache-npm.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Cache Lint | |
id: cache-lint | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./node_modules/.cache/prettier | |
./node_modules/.cache/.eslintcache | |
key: ${{ runner.os }}-lint-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-lint- | |
- name: Code Linting | |
if: steps.cache-lint.outputs.cache-hit != 'true' | |
run: npm run lint |