Skip to content

Commit

Permalink
Include jest tests in GitHub action
Browse files Browse the repository at this point in the history
The parameter SARIF_ESLINT_IGNORE_SUPPRESSED prevents that errors that
are disabled inline still show up on GitHub.
  • Loading branch information
BenediktSeidlSWM committed Jun 26, 2024
1 parent e271523 commit d5bc966
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/eslint.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# More details at https://github.com/eslint/eslint
# and https://eslint.org

name: ESLint
name: Continuous Integration

on:
push:
Expand All @@ -19,8 +19,8 @@ on:
- cron: '29 3 * * 5'

jobs:
eslint:
name: Run eslint scanning
ci:
name: Run code scanning and tests
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -30,16 +30,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Install ESLint
run: |
npm install [email protected]
npm install @microsoft/[email protected]
npm install [email protected]
- name: Install dependencies
run: yarn install

- name: Run ESLint
run: npx eslint .
--config .eslintrc.js
--ext .js,.jsx,.ts,.tsx
env:
SARIF_ESLINT_IGNORE_SUPPRESSED: true
run: yarn lint
--format @microsoft/eslint-formatter-sarif
--output-file eslint-results.sarif
continue-on-error: true
Expand All @@ -49,3 +46,6 @@ jobs:
with:
sarif_file: eslint-results.sarif
wait-for-processing: true

- name: Run Jest
run: yarn test
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"@babel/preset-env": "^7.24.5",
"@babel/preset-react": "^7.24.1",
"@furkot/webfonts-generator": "^2.0.2",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@testing-library/dom": "^10.1.0",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
Expand Down

0 comments on commit d5bc966

Please sign in to comment.