Skip to content

Commit

Permalink
ci(frontend): Add GitHub Actions workflow for frontend quality checks
Browse files Browse the repository at this point in the history
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
maikbasel committed Dec 21, 2023
1 parent cd5b80f commit 7475822
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/frontend_qa.yml
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'

0 comments on commit 7475822

Please sign in to comment.