From 419442c644651ec8db72e26f446b56123b284ebf Mon Sep 17 00:00:00 2001 From: Fernando Date: Wed, 6 Mar 2024 12:43:01 +0900 Subject: [PATCH 1/2] fix: disabled comments on every push, and added default value for coverage --- .github/workflows/cypress-testing.yml | 4 +--- .github/workflows/jest-testing.yml | 4 +--- tests/main.test.ts | 2 ++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cypress-testing.yml b/.github/workflows/cypress-testing.yml index bb0ce75..eadd68e 100644 --- a/.github/workflows/cypress-testing.yml +++ b/.github/workflows/cypress-testing.yml @@ -1,10 +1,8 @@ name: Run Cypress testing suite on: workflow_dispatch: - push: - branches: - - development pull_request: + types: [ opened, synchronize ] jobs: cypress-run: diff --git a/.github/workflows/jest-testing.yml b/.github/workflows/jest-testing.yml index 208cf7b..b8a785d 100644 --- a/.github/workflows/jest-testing.yml +++ b/.github/workflows/jest-testing.yml @@ -1,10 +1,8 @@ name: Run Jest testing suite on: workflow_dispatch: - push: - branches: - - development pull_request: + types: [ opened, synchronize ] env: NODE_ENV: "test" diff --git a/tests/main.test.ts b/tests/main.test.ts index 7967004..d891c3c 100644 --- a/tests/main.test.ts +++ b/tests/main.test.ts @@ -1,3 +1,4 @@ +import { mainModule } from "../static/main"; import { db } from "./__mocks__/db"; import { server } from "./__mocks__/node"; import usersGet from "./__mocks__/users-get.json"; @@ -18,5 +19,6 @@ describe("User tests", () => { const res = await fetch("https://api.ubiquity.com/users"); const data = await res.json(); expect(data).toMatchObject(usersGet); + expect(async () => await mainModule()).not.toThrow(); }); }); From 80a87174cb4616d053110f201fe0f55587c7989b Mon Sep 17 00:00:00 2001 From: Fernando Date: Wed, 6 Mar 2024 13:32:32 +0900 Subject: [PATCH 2/2] chore: workflow dispatch for knip --- .github/workflows/knip.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/knip.yml b/.github/workflows/knip.yml index df68bda..b686ba2 100644 --- a/.github/workflows/knip.yml +++ b/.github/workflows/knip.yml @@ -2,6 +2,7 @@ name: Knip on: pull_request: + workflow_dispatch: permissions: write-all @@ -27,4 +28,4 @@ jobs: comment_id: ${{ github.workflow }}-reporter command_script_name: knip-ci annotations: true - ignore_results: false \ No newline at end of file + ignore_results: false