chore: update deps #11
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: Sanity Checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
setup: | |
name: Setup Dependencies | |
runs-on: ubuntu-latest | |
outputs: | |
cache-key: ${{ steps.cache-node-modules.outputs.cache-hit }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.11.0' | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: yarn install --immutable | |
typecheck: | |
name: Typecheck | |
runs-on: ubuntu-latest | |
needs: [setup] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.11.0' | |
- name: Restore node_modules from cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Check types | |
run: yarn run typecheck | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
needs: [setup] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.11.0' | |
- name: Restore node_modules from cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Run ESLint | |
run: yarn run lint | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
needs: [typecheck, lint] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.11.0' | |
- name: Restore node_modules from cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Run tests | |
run: yarn run test | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.11.0' | |
- name: Restore node_modules from cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Run Build | |
run: yarn run build |