Skip to content

Commit

Permalink
Update CI workflow to use setup from Reselect, including type tests
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Oct 23, 2021
1 parent 7c76e62 commit a6b0a9a
Showing 1 changed file with 53 additions and 15 deletions.
68 changes: 53 additions & 15 deletions .github/workflows/test.yml
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

0 comments on commit a6b0a9a

Please sign in to comment.