Skip to content

fix: Update release.yml #5

fix: Update release.yml

fix: Update release.yml #5

name: Build, Lint, and Test
on:
workflow_call:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build-lint-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Cache node modules
uses: actions/cache@v4
id: npm-cache
with:
path: node_modules
key: ${{ runner.os }}-node-20-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-20-
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Run type check
run: npm run type-check
- name: Run linter
run: npm run lint
- name: Run tests
run: npm test
- name: Build
run: npm run build