Skip to content

Commit

Permalink
use coverage to run in ci and test for local testing development
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonam Serchan authored and sonam-serchan committed Aug 1, 2023
1 parent 4a190c5 commit ec2cba8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/run-ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
id-token: write

steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Checkout repo
uses: actions/checkout@v3

- name: Install taskfile
run: |
sudo snap install task --classic
- name: Install taskfile
run: |
sudo snap install task --classic
- id: run-unit-tests
name: Run unit tests
run: task install && task test
- id: run-unit-tests
name: Run unit tests
run: task install && task test
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tasks:
test:
desc: Run unit tests using jest
cmds:
- npm run test
- npm run coverage

compile:
desc: Compile typescript files
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"main": "index.js",
"scripts": {
"start": "functions-framework --target=xplorersbot",
"test": "task clean && jest --verbose --coverage",
"test": "task clean && jest --verbose --coverage --watch",
"coverage": "task clean && jest --verbose --coverage",
"start-xplorersbot-server": "task clean && tsc && cd out && npx functions-framework --target=xplorersbot --signature-type=http",
"start-openai-server": "task clean && tsc && cd out && npx functions-framework --target=xplorersbotOpenAI --signature-type=http"
},
Expand Down

0 comments on commit ec2cba8

Please sign in to comment.