Skip to content

Commit

Permalink
ci(test): validate typescript, run lint only once
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Apr 3, 2021
1 parent f7fa8fb commit a0f29ae
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,37 @@ name: Test
types:
- opened
- synchronize

jobs:
test:
test_matrix:
runs-on: ubuntu-latest
strategy:
matrix:
node_version:
- 10
- 12
- 14

steps:
- uses: actions/checkout@v2
- name: "Use Node.js ${{ matrix.node_version }}"
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v2
with:
node-version: "${{ matrix.node_version }}"
node-version: ${{ matrix.node_version }}
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm test --ignore-scripts # run lint only once

test:
runs-on: ubuntu-latest
needs: test_matrix
steps:
- uses: actions/checkout@v2
- run: npm ci
- run: npm test
- run: npm lint
- run: npm run test:typescript

0 comments on commit a0f29ae

Please sign in to comment.