feat: cleanup and run on push/PRs #9
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: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
install-and-cache: | |
name: Install Lint Type-check | |
container: node:18-bullseye | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Install | |
run: yarn install --immutable | |
- name: Lint | |
run: yarn lint | |
- name: Type check | |
run: yarn type-check | |
- name: Test | |
run: yarn test |