diff --git a/.github/workflows/run-ci-tests.yml b/.github/workflows/run-ci-tests.yml index 6f2520b..7f47799 100644 --- a/.github/workflows/run-ci-tests.yml +++ b/.github/workflows/run-ci-tests.yml @@ -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 diff --git a/Taskfile.yml b/Taskfile.yml index 85c1475..f6d3137 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -34,7 +34,7 @@ tasks: test: desc: Run unit tests using jest cmds: - - npm run test + - npm run coverage compile: desc: Compile typescript files diff --git a/package.json b/package.json index 9671801..1d93e91 100644 --- a/package.json +++ b/package.json @@ -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" },