[#512] chore: join test & code check workflows into one #1
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: 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 |