mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-06 01:25:33 +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:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- coverage-badge
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Build job
|
# Build job
|
||||||
@ -19,14 +20,26 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
npm link
|
|
||||||
working-directory: ./
|
working-directory: ./
|
||||||
|
|
||||||
- name: Build static files
|
- name: Build static files
|
||||||
id: build
|
id: build
|
||||||
run: npm install && npm run docs:generate
|
run: npm run docs:generate
|
||||||
working-directory: ./
|
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
|
- name: Upload static files as artifact
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/upload-pages-artifact@v3.0.1
|
uses: actions/upload-pages-artifact@v3.0.1
|
||||||
|
|||||||
@ -13,6 +13,7 @@ export default defineConfig({
|
|||||||
all: true,
|
all: true,
|
||||||
include: ['src/**/*.{js,jsx,ts,tsx}'],
|
include: ['src/**/*.{js,jsx,ts,tsx}'],
|
||||||
exclude: [...configDefaults.exclude, 'src/**/*.cy.tsx'],
|
exclude: [...configDefaults.exclude, 'src/**/*.cy.tsx'],
|
||||||
|
reporter: ['html', 'json-summary'],
|
||||||
thresholds: {
|
thresholds: {
|
||||||
lines: 1,
|
lines: 1,
|
||||||
functions: 59,
|
functions: 59,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user