add coverage check, try permision fix

This commit is contained in:
Arthur Lu 2022-12-04 19:44:30 -08:00
parent 35c8619f87
commit 08bd1dc3ba
2 changed files with 3 additions and 1 deletions

View File

@ -23,6 +23,8 @@ jobs:
uses: actions/checkout@v3
- name: Install dependencies
run: sudo npm install
- name: Give permissions to npm folder
run: sudo chown -R 1001:123 "/root/.npm"
- name: Start local http server
run: sudo npm run http-server &
- name: Run tests with coverage

View File

@ -4,7 +4,7 @@
"type": "module",
"scripts": {
"test": "mocha --recursive --require mock-local-storage './{,!(node_modules)/**}/*.test.js'",
"coverage": "c8 npm run test",
"coverage": "c8 --check-coverage --lines 90 --functions 90 --branches 90 npm run test",
"lint-js": "eslint **/*.js",
"fix-js": "eslint --fix **/*.js",
"lint-html": "htmlhint **/*.html",