From a5da7b2fc6f4acd2cb9d5d59c365c7a9a34c85d3 Mon Sep 17 00:00:00 2001 From: Aman Jain Date: Tue, 26 Oct 2021 11:09:56 +0530 Subject: [PATCH 1/7] feat(actions): added coverage.yml --- .github/workflows/coverage.yml | 23 +++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..cf9bfd2 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,23 @@ +name: 'coverage' +on: + pull_request: + branches: + - master + - main +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Tests on ${{ matrix.node-version }} + uses: artiomtr/jest-coverage-report-action@v2.0-rc.5 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + package-manager: yarn + test-script: yarn run test:coverage:jest + env: + CI: true \ No newline at end of file diff --git a/package.json b/package.json index bbb1aa3..92786f1 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "scripts": { "build": "tsc", "test": "jest", - "prepare": "husky install" + "prepare": "husky install", + "test:coverage:jest": "jest --silent --ci --json --coverage --testLocationInResults --outputFile=\"report.json\" --forceExit" } } From 43f0ad7612c3712b0d8d6bb54d83a4555fb17b4f Mon Sep 17 00:00:00 2001 From: Aman Jain Date: Tue, 18 Jan 2022 15:03:06 +0530 Subject: [PATCH 2/7] Update coverage.yml --- .github/workflows/coverage.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index cf9bfd2..12c7ff0 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,6 +13,8 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npx ci - name: Tests on ${{ matrix.node-version }} uses: artiomtr/jest-coverage-report-action@v2.0-rc.5 with: @@ -20,4 +22,4 @@ jobs: package-manager: yarn test-script: yarn run test:coverage:jest env: - CI: true \ No newline at end of file + CI: true From 6b6020b6e70fb9ae7fe8c0e541df6d239a4e1a65 Mon Sep 17 00:00:00 2001 From: Aman Jain Date: Tue, 18 Jan 2022 15:11:01 +0530 Subject: [PATCH 3/7] Update coverage.yml --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 12c7ff0..1d95aba 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -16,7 +16,7 @@ jobs: - name: Install dependencies run: npx ci - name: Tests on ${{ matrix.node-version }} - uses: artiomtr/jest-coverage-report-action@v2.0-rc.5 + uses: artiomtr/jest-coverage-report-action@v2.0-rc.6 with: github-token: ${{ secrets.GITHUB_TOKEN }} package-manager: yarn From 849fe6073a59a958ad2a184f06bf34a3d0423ab2 Mon Sep 17 00:00:00 2001 From: Aman Jain Date: Tue, 18 Jan 2022 15:16:44 +0530 Subject: [PATCH 4/7] Update coverage.yml --- .github/workflows/coverage.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 1d95aba..65a06c6 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,13 +13,11 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - name: Install dependencies - run: npx ci - name: Tests on ${{ matrix.node-version }} uses: artiomtr/jest-coverage-report-action@v2.0-rc.6 with: github-token: ${{ secrets.GITHUB_TOKEN }} package-manager: yarn - test-script: yarn run test:coverage:jest + test-script: yarn test:coverage:jest env: CI: true From 0c70bc8aaf7a1aed3b7dbaeb9625541b42294b8d Mon Sep 17 00:00:00 2001 From: Aman Jain Date: Tue, 18 Jan 2022 15:18:47 +0530 Subject: [PATCH 5/7] Update coverage.yml --- .github/workflows/coverage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 65a06c6..309eec5 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,6 +13,8 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npx ci - name: Tests on ${{ matrix.node-version }} uses: artiomtr/jest-coverage-report-action@v2.0-rc.6 with: From 06841e52f85854ddc437be26e6c70342c0d5a752 Mon Sep 17 00:00:00 2001 From: Aman Jain Date: Tue, 18 Jan 2022 15:21:35 +0530 Subject: [PATCH 6/7] Update coverage.yml --- .github/workflows/coverage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 309eec5..587ddb0 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -20,6 +20,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} package-manager: yarn - test-script: yarn test:coverage:jest + test-script: yarn test:coverage:jest + annotations: none env: CI: true From 39cd73dc05ca90793e55d3e17fa97af668f43eb4 Mon Sep 17 00:00:00 2001 From: Aman Jain Date: Tue, 18 Jan 2022 15:22:50 +0530 Subject: [PATCH 7/7] Update coverage.yml --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 587ddb0..edc9894 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -20,7 +20,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} package-manager: yarn - test-script: yarn test:coverage:jest + test-script: yarn run test:coverage:jest annotations: none env: CI: true