Skip to content

Commit

Permalink
[#512] chore: add type checking & lint workflow to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzalowski committed Mar 19, 2024
1 parent ffd1129 commit eb7aad4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/code_style_check_frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Frontend Lint & Type Check

on:
push:
paths:
- govtool/frontend/**
- .github/workflows/code_check_frontend.yml

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: Install dependencies
working-directory: govtool/frontend
run: npm install

- name: Lint
working-directory: govtool/frontend
run: npm run lint

- name: Type Check
working-directory: govtool/frontend
run: npm run tsc
1 change: 1 addition & 0 deletions govtool/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"dev": "vite",
"build": "vite build",
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"tsc": "tsc --noEmit --skipLibCheck",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
Expand Down

0 comments on commit eb7aad4

Please sign in to comment.