Enforce coverage %.
This commit is contained in:
@@ -8,7 +8,7 @@ on:
|
|||||||
- dev
|
- dev
|
||||||
pull_request:
|
pull_request:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "17 6 * * *"
|
- cron: '17 6 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -25,23 +25,31 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --immutable
|
run: yarn install --immutable
|
||||||
|
|
||||||
|
- name: Test & Coverage
|
||||||
|
run: yarn run coverage
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: yarn run build
|
run: yarn run build
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: yarn run test
|
|
||||||
|
|
||||||
- name: HACS build validation
|
- name: HACS build validation
|
||||||
uses: "hacs/action@21.12.1"
|
uses: 'hacs/action@21.12.1'
|
||||||
with:
|
with:
|
||||||
category: "plugin"
|
category: 'plugin'
|
||||||
|
|
||||||
# Don't attempt to load into HACS (as it loads the release, not the
|
# Don't attempt to load into HACS (as it loads the release, not the
|
||||||
# build).
|
# build).
|
||||||
ignore: "hacs"
|
ignore: 'hacs'
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload javascript
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: frigate-hass-card
|
name: frigate-hass-card
|
||||||
path: dist/*.js
|
path: dist/*.js
|
||||||
|
|
||||||
|
# When this issue is fixed, it would be useful to upload visualizations:
|
||||||
|
# https://github.com/actions/upload-artifact/issues/14
|
||||||
|
# - name: Upload visualizations
|
||||||
|
# uses: actions/upload-artifact@v3
|
||||||
|
# with:
|
||||||
|
# name: frigate-hass-card
|
||||||
|
# path: visualizations/*.html
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ package-lock.json
|
|||||||
.env
|
.env
|
||||||
.envrc
|
.envrc
|
||||||
|
|
||||||
stats.html
|
/visualizations/
|
||||||
/coverage/
|
/coverage/
|
||||||
|
|
||||||
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
|
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
|
||||||
|
|||||||
+4
-1
@@ -58,7 +58,10 @@ const plugins = [
|
|||||||
}),
|
}),
|
||||||
watch && serve(serveopts),
|
watch && serve(serveopts),
|
||||||
!dev && terser(),
|
!dev && terser(),
|
||||||
visualizer(),
|
visualizer({
|
||||||
|
filename: 'visualizations/treemap.html',
|
||||||
|
template: 'treemap',
|
||||||
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,6 +6,14 @@ export default defineConfig({
|
|||||||
coverage: {
|
coverage: {
|
||||||
// Favor istanbul for coverage over v8 due to better accuracy.
|
// Favor istanbul for coverage over v8 due to better accuracy.
|
||||||
provider: 'istanbul',
|
provider: 'istanbul',
|
||||||
|
|
||||||
|
// Thresholds will automatically be updated as coverage improves to avoid
|
||||||
|
// back-sliding.
|
||||||
|
thresholdAutoUpdate: true,
|
||||||
|
statements: 71.65,
|
||||||
|
branches: 60.62,
|
||||||
|
functions: 72.78,
|
||||||
|
lines: 71.54,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user