-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(frontend): Add GitHub Actions workflow for frontend quality checks
A new Quality Assurance Checks workflow has been added to the project's GitHub Actions. This workflow automatically runs on every push and pull request to the master branch. It includes various checks including code linting with ESLint and unit tests with Jest. This ensures that all code changes are properly verified for quality before being merged. Refs: #8
- Loading branch information
Showing
1 changed file
with
70 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,70 @@ | ||
name: Quality Assurance Checks | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'src-tauri/**' | ||
- 'docker-compose.yml' | ||
- 'README.md' | ||
- 'LICENSE.md' | ||
- '.gitignore' | ||
branches: | ||
- master | ||
pull_request: | ||
paths-ignore: | ||
- 'src-tauri/**' | ||
- 'docker-compose.yml' | ||
- 'README.md' | ||
- 'LICENSE.md' | ||
- '.gitignore' | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
actions: read | ||
checks: write | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Lint with ESLint | ||
run: npm run lint:report | ||
continue-on-error: true | ||
|
||
- name: Annotate Code Linting Results | ||
uses: ataylorme/eslint-annotate-action@v2 | ||
with: | ||
report-json: "eslint_report.json" | ||
|
||
- name: Test with Jest | ||
run: npm run test:ci | ||
|
||
- name: Create Test Report | ||
uses: dorny/test-reporter@v1 | ||
if: success() || failure() | ||
with: | ||
name: JEST Tests | ||
path: junit.xml | ||
reporter: jest-junit | ||
|
||
# TODO: Add e2e tests | ||
# - name: End-to-end tests with Cypress | ||
# uses: cypress-io/github-action@v2 | ||
# with: | ||
# start: npm run start | ||
# wait-on: 'http://localhost:3000' |