Skip to content

Commit

Permalink
create dedicated lint job
Browse files Browse the repository at this point in the history
The `lint` tests will run against source files and should not be
dependant on a specific node version. Instead of running the `npm run
style` on every node version we use, we can and should only run it once.
  • Loading branch information
RobinMalfait committed Oct 20, 2022
1 parent 76fac68 commit 4439332
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/nodejs.yml
Expand Up @@ -47,8 +47,36 @@ jobs:
- name: Build Tailwind CSS
run: npm run swcify

- name: Lint
run: npm run style

- name: Test
run: npm test

lint:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# cache: 'npm'
#
# - name: Use cached node_modules
# id: cache
# uses: actions/cache@v3
# with:
# path: node_modules
# key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
# restore-keys: |
# nodeModules-

- name: Install dependencies
# if: steps.cache.outputs.cache-hit != 'true'
run: npm install

- name: Lint
run: npm run style

0 comments on commit 4439332

Please sign in to comment.