Skip to content

Commit

Permalink
Test: Add code coverage report for frontend tests (#641)
Browse files Browse the repository at this point in the history
* test: Add test command that also generates a code coverage report

* chore: Add test-front-ci script

* ci: Update frontend test command in GitHub Actions workflow
  • Loading branch information
drikusroor authored Dec 11, 2023
1 parent 339cda4 commit 390ff0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Run Frontend Tests
run: sudo docker-compose --env-file .env-github-actions run client yarn test --watchAll=false
run: sudo docker-compose --env-file .env-github-actions run client yarn test:ci --watchAll=false

frontend-lint:
name: Lint Frontend
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"start": "react-scripts start",
"build": "sass src/index.scss src/index.css; react-scripts build",
"test": "react-scripts test",
"test:ci": "react-scripts test --coverage --watchAll=false",
"eject": "react-scripts eject",
"scss": "sass src/index.scss src/index.css",
"scss-watch": "sass src/index.scss src/index.css; sass --watch src/index.scss src/index.css",
Expand Down
2 changes: 2 additions & 0 deletions scripts/test-front-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
docker-compose run --rm client yarn test:ci

0 comments on commit 390ff0b

Please sign in to comment.