ci: remove redundant test steps and add coverage artifact uploads
The lint-and-test job was running tests twice: - 'Backend unit tests' ran tests without coverage - 'Backend coverage' ran the same tests again with JaCoCo - 'Frontend unit tests' ran tests without coverage - 'Frontend coverage' ran the same tests again with v8 coverage This wasted ~2x test time for no benefit since coverage steps already run all tests. - Remove 'Backend unit tests' and 'Frontend unit tests' steps - Keep only coverage steps (jacocoTestCoverageVerification and test:coverage) - Add artifact upload steps for both coverage HTML reports: - backend-coverage: backend/build/reports/jacoco/test/html/ - frontend-coverage: frontend/coverage/ - 7-day retention to avoid storage bloat Result: lint-and-test job runs faster (no duplicate test runs) and produces downloadable HTML coverage reports visible in the Forgejo Actions UI.
This commit is contained in:
parent
df7cf9f020
commit
3e014b90ae
1 changed files with 14 additions and 7 deletions
|
|
@ -39,13 +39,6 @@ jobs:
|
|||
run: npx vue-tsc --noEmit
|
||||
working-directory: frontend
|
||||
|
||||
- name: Frontend unit tests
|
||||
run: npm run test
|
||||
working-directory: frontend
|
||||
|
||||
- name: Backend unit tests
|
||||
run: ./gradlew :backend:test
|
||||
|
||||
- name: Backend coverage
|
||||
run: ./gradlew :backend:jacocoTestCoverageVerification
|
||||
|
||||
|
|
@ -53,6 +46,20 @@ jobs:
|
|||
run: npm run test:coverage
|
||||
working-directory: frontend
|
||||
|
||||
- name: Upload backend coverage report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: backend-coverage
|
||||
path: backend/build/reports/jacoco/test/html/
|
||||
retention-days: 7
|
||||
|
||||
- name: Upload frontend coverage report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: frontend-coverage
|
||||
path: frontend/coverage/
|
||||
retention-days: 7
|
||||
|
||||
e2e:
|
||||
name: E2E browser tests
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
Loading…
Reference in a new issue