Browse Source

Add type check to npm scripts (#4631)

pull/4676/head
Matt Gibson 3 years ago committed by GitHub
parent
commit
084c89107e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      .github/workflows/test.yml
  2. 1
      package.json

6
.github/workflows/test.yml

@ -46,11 +46,7 @@ jobs: @@ -46,11 +46,7 @@ jobs:
# Tests in apps/ are typechecked when their app is built, so we just do it here for libs/
# See https://bitwarden.atlassian.net/browse/EC-497
- name: Run typechecking
run: |
for p in libs/**/tsconfig.spec.json; do
echo "Typechecking $p"
npx tsc --noEmit --project $p
done
run: npm run test:types
- name: Run tests
run: npm run test

1
package.json

@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
"test": "jest",
"test:watch": "jest --clearCache && jest --watch",
"test:watch:all": "jest --watchAll",
"test:types": "for p in libs/**/tsconfig.spec.json; do echo \"Typechecking $p\"; tsc --noEmit --project $p; done",
"docs:json": "compodoc -p ./tsconfig.json -e json -d .",
"storybook": "npm run docs:json && start-storybook -p 6006",
"build-storybook": "npm run docs:json && build-storybook",

Loading…
Cancel
Save