Skip to content

[#512] chore: join test & code check workflows into one #1

[#512] chore: join test & code check workflows into one

[#512] chore: join test & code check workflows into one #1

name: Frontend Test, Lint & Type Check
on:
push:
paths:
- govtool/frontend/**
- .github/workflows/test_frontend.yml
defaults:
run:
working-directory: govtool/frontend
jobs:
code_check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v2
with:
path: govtool/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18.x"
- name: Run Frontend Test
run: |
npm install
npm run test
- name: Lint
run: npm run lint
- name: Type Check
run: npm run tsc