mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +00:00
generate coverage badge
generate coverage badge in docs generation workflow in order to upload it with the documentation
This commit is contained in:
parent
0169f1c8bc
commit
8705d8e14f
17
.github/workflows/deploy.docs.yml
vendored
17
.github/workflows/deploy.docs.yml
vendored
@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- coverage-badge
|
||||
|
||||
jobs:
|
||||
# Build job
|
||||
@ -19,14 +20,26 @@ jobs:
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
npm link
|
||||
working-directory: ./
|
||||
|
||||
- name: Build static files
|
||||
id: build
|
||||
run: npm install && npm run docs:generate
|
||||
run: npm run docs:generate
|
||||
working-directory: ./
|
||||
|
||||
- name: Generate coverage Badge
|
||||
id: coverage
|
||||
run: npm run test:unit
|
||||
|
||||
- name: Create Coverage Badges
|
||||
id: coverage-badge
|
||||
uses: jaywcjlove/coverage-badges-cli@main
|
||||
with:
|
||||
style: flat
|
||||
source: coverage/coverage-summary.json
|
||||
output: docs/test.svg
|
||||
jsonPath: totals.percent_covered
|
||||
|
||||
- name: Upload static files as artifact
|
||||
id: deployment
|
||||
uses: actions/upload-pages-artifact@v3.0.1
|
||||
|
||||
@ -13,6 +13,7 @@ export default defineConfig({
|
||||
all: true,
|
||||
include: ['src/**/*.{js,jsx,ts,tsx}'],
|
||||
exclude: [...configDefaults.exclude, 'src/**/*.cy.tsx'],
|
||||
reporter: ['html', 'json-summary'],
|
||||
thresholds: {
|
||||
lines: 1,
|
||||
functions: 59,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user