From 2b3e521b573d9dbaf4943043d22d34bd08c68683 Mon Sep 17 00:00:00 2001 From: Doron Sharon Date: Fri, 22 Dec 2023 22:56:49 +0200 Subject: [PATCH] Fix github workflow event (#306) * Fix github workflow event * jest coverage --------- Co-authored-by: Nir Gur Arie --- .github/workflows/ci.yml | 13 +++++-------- jest.config.cjs | 8 ++++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec48f21b..7b7c7008 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ name: CI -on: push +on: + pull_request: + push: + branches: + - main env: NODE_VERSION: 16.14 @@ -93,10 +97,3 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_READ_ORG }} - name: Testing run: npm test - - name: Coverage check - uses: devmasx/coverage-check-action@v1.2.0 - with: - type: lcov - min_coverage: 95 - result_path: coverage/lcov.info - token: ${{ github.token }} diff --git a/jest.config.cjs b/jest.config.cjs index a2beeb7e..1ddb4a3f 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -4,6 +4,14 @@ module.exports = { collectCoverage: true, coverageDirectory: 'coverage', collectCoverageFrom: ['lib/**/*.{js,jsx,ts,tsx}'], + coverageThreshold: { + global: { + branches: 74, + functions: 97, + lines: 97, + statements: 97, + }, + }, // A set of global variables that need to be available in all test environments globals: {