From 77177c0bea2a4772f846704f66dfef481afc366f Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Thu, 23 Mar 2023 20:04:58 +0100 Subject: [PATCH 01/12] feat: added gh action pipeline to check the project --- .github/workflows/check.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..73914d5 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,26 @@ +name: Check Changes + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14.x, 16.x, 18.x, 19.x] + steps: + - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 + - name: Set up Node.js version ${{ matrix.node-version }} + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run test \ No newline at end of file From 71659d896877e31d8612e0b8784afec78b26e7c4 Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Thu, 23 Mar 2023 20:09:15 +0100 Subject: [PATCH 02/12] feat: added code coverage to the pipeline --- .github/workflows/check.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 73914d5..5af3e2b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -10,7 +10,7 @@ permissions: contents: read jobs: - build: + test: runs-on: ubuntu-latest strategy: matrix: @@ -22,5 +22,15 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: npm ci - - run: npm run test \ No newline at end of file + - name: ๐Ÿ“ฆ Install dependencies + run: npm ci + - name: ๐Ÿงช Run tests + run: npm run test + coveralls: + needs: test + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ“ˆ Report code coverage + uses: coverallsapp/github-action@348853a262cc37fa2f8abe2827729d193cbb00dc # v1.1.1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From e570ee3240121a71b0ae454efd25eeab515da46d Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Thu, 23 Mar 2023 20:09:36 +0100 Subject: [PATCH 03/12] chore: deleted Travis pipeline --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 658faab..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -sudo: false -language: node_js -node_js: - - 19 - - 18 - - 16 - - 14 -after_script: 'cat ./coverage/lcov.info | coveralls' From 1680a35b9150a8ed042ef8d34091253d9e0b1041 Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Thu, 23 Mar 2023 20:11:38 +0100 Subject: [PATCH 04/12] chore: replace CI badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 81c6d68..57ba693 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# generator-generator [![Build Status](https://secure.travis-ci.org/yeoman/generator-generator.svg?branch=master)](https://travis-ci.org/yeoman/generator-generator) [![Coverage Status](https://coveralls.io/repos/yeoman/generator-generator/badge.svg?branch=master&service=github)](https://coveralls.io/github/yeoman/generator-generator?branch=master) +# generator-generator [![Check Changes](https://github.com/yeoman/generator-generator/actions/workflows/check.yml/badge.svg)](https://github.com/yeoman/generator-generator/actions/workflows/check.yml) [![Coverage Status](https://coveralls.io/repos/yeoman/generator-generator/badge.svg?branch=master&service=github)](https://coveralls.io/github/yeoman/generator-generator?branch=master) > Yeoman generator generating a Yeoman generator From f87eaadee6db1c03dfa6f1e0e6e28e301fce0d34 Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Thu, 23 Mar 2023 20:17:26 +0100 Subject: [PATCH 05/12] fix: test coverage report generation --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 56e1ccf..971fc54 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ ], "repository": "yeoman/generator-generator", "scripts": { - "test": "jest", + "test": "jest --coverage", "pretest": "eslint . --fix", "prepublishOnly": "npm audit" }, From 7e1e0e747d2f3d2218cbb2af3b8396b3ae4797b5 Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Thu, 23 Mar 2023 20:20:30 +0100 Subject: [PATCH 06/12] fix: lcov file reference --- .github/workflows/check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5af3e2b..735e178 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -33,4 +33,5 @@ jobs: - name: ๐Ÿ“ˆ Report code coverage uses: coverallsapp/github-action@348853a262cc37fa2f8abe2827729d193cbb00dc # v1.1.1 with: + path-to-lcov: /coverage/lcov.info github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 1563fd864acc7349061f308c39fbf5ea87ca5247 Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Thu, 23 Mar 2023 20:23:17 +0100 Subject: [PATCH 07/12] fix: path reference for lcov report --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 735e178..70aeafd 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -33,5 +33,5 @@ jobs: - name: ๐Ÿ“ˆ Report code coverage uses: coverallsapp/github-action@348853a262cc37fa2f8abe2827729d193cbb00dc # v1.1.1 with: - path-to-lcov: /coverage/lcov.info + path-to-lcov: coverage/lcov.info github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 8b35da73990c91f0446efdb10115f282d689b372 Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Thu, 23 Mar 2023 20:28:46 +0100 Subject: [PATCH 08/12] fix: removed empty space --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 70aeafd..1ea010a 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -33,5 +33,5 @@ jobs: - name: ๐Ÿ“ˆ Report code coverage uses: coverallsapp/github-action@348853a262cc37fa2f8abe2827729d193cbb00dc # v1.1.1 with: - path-to-lcov: coverage/lcov.info + path-to-lcov: coverage/lcov.info github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 0554531dcb22d9ef5ec8ea2837fd2d7ba9c1a4bf Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Thu, 23 Mar 2023 20:34:39 +0100 Subject: [PATCH 09/12] fix: path for test coverage --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1ea010a..9d118a0 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -33,5 +33,5 @@ jobs: - name: ๐Ÿ“ˆ Report code coverage uses: coverallsapp/github-action@348853a262cc37fa2f8abe2827729d193cbb00dc # v1.1.1 with: - path-to-lcov: coverage/lcov.info + path-to-lcov: ./coverage/lcov.info github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From cfb71f043afde23431999d6b76ce81daded3ef92 Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Thu, 23 Mar 2023 20:41:46 +0100 Subject: [PATCH 10/12] chore: upgraded pipeline dependency --- .github/workflows/check.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9d118a0..19d93fd 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -31,7 +31,6 @@ jobs: runs-on: ubuntu-latest steps: - name: ๐Ÿ“ˆ Report code coverage - uses: coverallsapp/github-action@348853a262cc37fa2f8abe2827729d193cbb00dc # v1.1.1 + uses: coverallsapp/github-action@67662d24394fd74bffcf7b462d1b432814159afd # v2.0.0 with: - path-to-lcov: ./coverage/lcov.info github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 4bec74696169e96e75a47cb035e3d90b34a9c1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulises=20Gasc=C3=B3n?= Date: Fri, 24 Mar 2023 00:37:50 +0100 Subject: [PATCH 11/12] Update .github/workflows/check.yml Co-authored-by: Eddie Monge Jr --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 19d93fd..59a9573 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -25,7 +25,7 @@ jobs: - name: ๐Ÿ“ฆ Install dependencies run: npm ci - name: ๐Ÿงช Run tests - run: npm run test + run: npm run test -- --coverage coveralls: needs: test runs-on: ubuntu-latest From f556db17a7e39cfe4fbd736c3cbd15413ee9f2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulises=20Gasc=C3=B3n?= Date: Fri, 24 Mar 2023 00:37:56 +0100 Subject: [PATCH 12/12] Update package.json Co-authored-by: Eddie Monge Jr --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 971fc54..56e1ccf 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ ], "repository": "yeoman/generator-generator", "scripts": { - "test": "jest --coverage", + "test": "jest", "pretest": "eslint . --fix", "prepublishOnly": "npm audit" },