Add PreloadedState generic #857
Workflow file for this run
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: CI | |
on: [push, pull_request] | |
jobs: | |
changes: | |
name: Check for changes | |
runs-on: ubuntu-latest | |
outputs: | |
src: ${{ steps.filter.outputs.src }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
src: | |
- 'src/**' | |
- 'test/**' | |
build: | |
needs: changes | |
if: ${{ needs.changes.outputs.src == 'true' }} | |
name: Lint, Test, Build & Pack on Node ${{ matrix.node }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: ['16.x'] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Use node ${{ matrix.node }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'yarn' | |
- name: Install deps | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Pack | |
run: yarn pack | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: package | |
path: ./package.tgz | |
test-dist: | |
name: Test against dist | |
needs: [build] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node: ['16.x'] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Use node ${{ matrix.node }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'yarn' | |
- name: Install deps | |
run: yarn install | |
- uses: actions/download-artifact@v2 | |
with: | |
name: package | |
path: . | |
- run: ls -lah | |
- name: Install build artifact | |
run: yarn add ./package.tgz | |
- run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.json ./vitest.config.ts ./test/tsconfig.json ./test/typescript/tsconfig.json | |
- name: Run tests, against dist | |
run: yarn test | |
test-types: | |
name: Test Types with TypeScript ${{ matrix.ts }} | |
needs: [build] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node: ['16.x'] | |
ts: ['4.1', '4.2', '4.3', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9.2-rc'] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Use node ${{ matrix.node }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'yarn' | |
- name: Install deps | |
run: yarn install | |
- name: Install TypeScript ${{ matrix.ts }} | |
run: yarn add typescript@${{ matrix.ts }} | |
- uses: actions/download-artifact@v2 | |
with: | |
name: package | |
path: . | |
- name: Install build artifact | |
run: yarn add ./package.tgz | |
- name: Test types | |
run: | | |
yarn tsc --version | |
yarn check-types | |
yarn test:types |