Switch package manager to Yarn 3 and update CI jobs #54
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: Tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
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 | |
# Read existing version, reuse that, add a Git short hash | |
# - name: Set build version to Git commit | |
# run: node scripts/writeGitVersion.js $(git rev-parse --short HEAD) | |
# - name: Check updated version | |
# run: jq .version package.json | |
- name: Run linter | |
run: yarn lint | |
- name: Run tests | |
run: yarn test | |
- name: Compile | |
run: yarn build | |
- name: Pack | |
run: yarn pack | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: package | |
path: packages/toolkit/package.tgz | |
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.2', '4.3', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9', '5.0'] | |
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 }} | |
- name: Test types | |
run: | | |
yarn tsc --version | |
yarn test:typescript |