From 9c0775713d3457270ae32d378b7679fe0e27859e Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Sep 2024 11:53:51 +0200 Subject: [PATCH 01/10] chore: do not test on EOL Node.js versions --- .github/workflows/node.js.yml | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6ea78ea..8304668 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -10,26 +10,11 @@ on: branches: [ main ] jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [16.x, 18.x, 20.x] - - steps: - - uses: actions/checkout@v3 - with: - # Need commit history test for cli-tests - fetch-depth: 0 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm run build --if-present - - run: npm run test-ci - env: - CI: true - - run: bash <(curl -s https://codecov.io/bash) + test: + name: Test on Node.js + uses: pkgjs/action/.github/workflows/node-test.yaml@v0 + with: + test-command: npm run test-ci + post-test-steps: | + - name: Upload coverage report to Codecov + run: bash <(curl -s https://codecov.io/bash) From 90ef8a9ddeac321a59bb23d9febf85b78be31359 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Sep 2024 11:59:54 +0200 Subject: [PATCH 02/10] add `engines` field --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 5548524..f61c78b 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,9 @@ "bin": { "core-validate-commit": "./bin/cmd.js" }, + "engines": { + "node": "^18.18.0 || >=20.10.0" + }, "author": "Evan Lucas ", "repository": { "type": "git", From 7c4feaa1e3c398450dff1cc8bbf46a8ff869b527 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Sep 2024 12:05:14 +0200 Subject: [PATCH 03/10] fixup! chore: do not test on EOL Node.js versions --- .github/workflows/node.js.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8304668..a8165d2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -14,6 +14,8 @@ jobs: name: Test on Node.js uses: pkgjs/action/.github/workflows/node-test.yaml@v0 with: + post-install-steps: | + - run: npm run build --if-present test-command: npm run test-ci post-test-steps: | - name: Upload coverage report to Codecov From f9868c8ba9623e250f952495b750ee30fd452557 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Sep 2024 12:07:50 +0200 Subject: [PATCH 04/10] fixup! fixup! chore: do not test on EOL Node.js versions --- .github/workflows/node.js.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a8165d2..089675a 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -16,7 +16,9 @@ jobs: with: post-install-steps: | - run: npm run build --if-present + shell: bash test-command: npm run test-ci post-test-steps: | - name: Upload coverage report to Codecov run: bash <(curl -s https://codecov.io/bash) + shell: bash From 576a8615974ee02c994ae08dba0edb9a4a9e06dc Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Sep 2024 12:14:22 +0200 Subject: [PATCH 05/10] fetch commit used for tests --- .github/workflows/node.js.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 089675a..1d891cb 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -14,6 +14,9 @@ jobs: name: Test on Node.js uses: pkgjs/action/.github/workflows/node-test.yaml@v0 with: + post-checkout-steps: | + - run: git fetch origin 2b98d02b52 + shell: bash post-install-steps: | - run: npm run build --if-present shell: bash From ece18b9738371550be4e888fb329b68db1026bc7 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Sep 2024 12:15:55 +0200 Subject: [PATCH 06/10] fixup! fetch commit used for tests --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1d891cb..a2c8cf0 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,7 +15,7 @@ jobs: uses: pkgjs/action/.github/workflows/node-test.yaml@v0 with: post-checkout-steps: | - - run: git fetch origin 2b98d02b52 + - run: git fetch origin 2b98d02b52a0abe98054eccb351e1e5c71c81bb0 shell: bash post-install-steps: | - run: npm run build --if-present From 61a47e08a5bdcb9331ad5933863fd479de6a5e43 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Sep 2024 12:18:07 +0200 Subject: [PATCH 07/10] fixup! fetch commit used for tests --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a2c8cf0..3ad360f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,7 +15,7 @@ jobs: uses: pkgjs/action/.github/workflows/node-test.yaml@v0 with: post-checkout-steps: | - - run: git fetch origin 2b98d02b52a0abe98054eccb351e1e5c71c81bb0 + - run: git fetch origin 2b98d02b52a0abe98054eccb351e1e5c71c81bb0 69435db261650dfc74ede6dca89acbe97ba30081 shell: bash post-install-steps: | - run: npm run build --if-present From b7742ce61374623fe396ef4c458ea532e18e9a43 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Sep 2024 12:24:11 +0200 Subject: [PATCH 08/10] fixup! fetch commit used for tests --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3ad360f..9ec1665 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,7 +15,7 @@ jobs: uses: pkgjs/action/.github/workflows/node-test.yaml@v0 with: post-checkout-steps: | - - run: git fetch origin 2b98d02b52a0abe98054eccb351e1e5c71c81bb0 69435db261650dfc74ede6dca89acbe97ba30081 + - run: git fetch --depth=2 origin HEAD 2b98d02b52a0abe98054eccb351e1e5c71c81bb0 69435db261650dfc74ede6dca89acbe97ba30081 shell: bash post-install-steps: | - run: npm run build --if-present From 64462e5d881865763fcd4ebed42cf401cdbbe5e9 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Sep 2024 12:27:11 +0200 Subject: [PATCH 09/10] fixup! fetch commit used for tests --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9ec1665..8c50c37 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,7 +15,7 @@ jobs: uses: pkgjs/action/.github/workflows/node-test.yaml@v0 with: post-checkout-steps: | - - run: git fetch --depth=2 origin HEAD 2b98d02b52a0abe98054eccb351e1e5c71c81bb0 69435db261650dfc74ede6dca89acbe97ba30081 + - run: git fetch --deepen=2 origin 2b98d02b52a0abe98054eccb351e1e5c71c81bb0 69435db261650dfc74ede6dca89acbe97ba30081 shell: bash post-install-steps: | - run: npm run build --if-present From 97407b295edc770c548ede60a6aa44a2c3e3656c Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 2 Sep 2024 12:31:10 +0200 Subject: [PATCH 10/10] fixup! fetch commit used for tests --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8c50c37..715ed26 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -14,6 +14,7 @@ jobs: name: Test on Node.js uses: pkgjs/action/.github/workflows/node-test.yaml@v0 with: + # We need to fetch some specific commits that we are using in our tests. We also need `--deepen=2` for CodCov. post-checkout-steps: | - run: git fetch --deepen=2 origin 2b98d02b52a0abe98054eccb351e1e5c71c81bb0 69435db261650dfc74ede6dca89acbe97ba30081 shell: bash