-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add frontend lint and test workflows
- Loading branch information
1 parent
981a7d1
commit cff42da
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Lint Frontend | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- 'frontend/**' | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- 'frontend/**' | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
cache: 'npm' | ||
cache-dependency-path: frontend/package-lock.json | ||
- name: Install dependencies | ||
working-directory: frontend | ||
run: npm ci | ||
- name: Run lint | ||
working-directory: frontend | ||
run: npm run lint |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Frontend Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- 'frontend/**' | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- 'frontend/**' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
cache: 'npm' | ||
cache-dependency-path: frontend/package-lock.json | ||
- name: Install dependencies | ||
working-directory: frontend | ||
run: npm ci | ||
- name: Run tests | ||
working-directory: frontend | ||
run: npm run test |