-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CI workflow to use setup from Reselect, including type tests
- Loading branch information
1 parent
7c76e62
commit a6b0a9a
Showing
1 changed file
with
53 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,65 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
|
||
name: CI | ||
on: [pull_request] | ||
jobs: | ||
build: | ||
name: Test Suite | ||
name: Lint, Test, Report Coverage on Node ${{ matrix.node }} | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: ['14.x'] | ||
|
||
steps: | ||
- name: Set up Node | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use node ${{ matrix.node }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
cache: npm | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: c-hive/gha-npm-cache@v1 | ||
|
||
- name: Install deps | ||
run: npm ci --ignore-scripts | ||
|
||
- name: Run linter | ||
run: npm run lint | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run tests | ||
run: npm test | ||
|
||
- name: Run build | ||
- name: Compile | ||
run: npm run build | ||
|
||
- name: Run test suite | ||
run: npm test | ||
test-types: | ||
name: Test Types with TypeScript ${{ matrix.ts }} | ||
|
||
needs: [build] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: ['14.x'] | ||
ts: ['4.2', '4.3', '4.4', 'next'] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use node ${{ matrix.node }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- uses: c-hive/gha-npm-cache@v1 | ||
|
||
- name: Install deps | ||
run: npm ci --ignore-scripts | ||
|
||
- name: Install TypeScript ${{ matrix.ts }} | ||
run: npm install typescript@${{ matrix.ts }} --ignore-scripts | ||
|
||
- name: Test types | ||
run: | | ||
./node_modules/.bin/tsc --version | ||
npm run test:typescript |