Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show test results in ci #2803

Merged
merged 9 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Build UI
run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn test:unit --reporter=json --outputFile=base-report.json && node ./scripts/fix-coverage-report.js --outputFile base-report.json
run: yarn test:unit --coverage.reporter=json --outputFile=base-report.json && node ./scripts/fix-coverage-report.js --outputFile base-report.json
- name: Upload Report
uses: actions/upload-artifact@v3
with:
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Build UI
run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn test:unit --reporter=json --outputFile=branch-report.json && node ./scripts/fix-coverage-report.js --outputFile branch-report.json
run: yarn test:unit --coverage.reporter=json --outputFile=branch-report.json && node ./scripts/fix-coverage-report.js --outputFile branch-report.json
- name: Upload Report
uses: actions/upload-artifact@v3
with:
Expand All @@ -55,9 +55,9 @@ jobs:
- name: Generate Coverage Report
uses: ArtiomTr/jest-coverage-report-action@v2
with:
test-script: yarn test:unit --silent
test-script: yarn test:unit
package-manager: yarn
github-token: ${{ secrets.GITHUB_TOKEN }}
coverage-file: branch-report.json
base-coverage-file: base-report.json
annotations: none
annotations: all
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@
"lines": 50,
"statements": 50
}
},
"coverageReporters": [
"text",
"json-summary",
"text-summary",
"lcov"
]
}
},
"dependencies": {
"@emotion/react": "^11.11.1",
Expand Down Expand Up @@ -145,9 +139,9 @@
"scripts": {
"build": "yarn vite build",
"start": "yarn vite dev",
"test": "vitest --threads false",
"test:unit": "vitest --threads false --coverage",
"test:e2e": "vitest --threads false --watchAll=false",
"test": "vitest --threads=false",
"test:unit": "vitest --threads=false --coverage.enabled --coverage.reportOnFailure",
"test:e2e": "vitest --threads=false --watchAll=false",
"lint": "eslint --config ./.eslintrc.js ./src/ --ext .jsx,.js,.tsx,.ts",
"lint:fix": "prettier --write ./src/ & yarn lint --fix",
"theme": "npx gulp less",
Expand Down
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default ({ mode }) => {
],
coverage: {
provider: "v8",
reporter: ["text", "json", "html", "lcov", "json-summary", "text-summary"],
},
},
optimizeDeps: {
Expand Down
Loading