From c23b4737f3f198ac3345c2d1d8983c90654f5192 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 21 Oct 2023 16:15:03 +0200 Subject: [PATCH 1/6] Add Node 18 and 20 to Travis for CI --- .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 5c5e7f6..adb31b0 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x, 16.x] + node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} From 631f18366285bdd8c6e51c2512807f8a97ca570d Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 21 Oct 2023 16:17:40 +0200 Subject: [PATCH 2/6] Remove 10.x, 12.x and 14.x --- .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 adb31b0..afbaa05 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x] + node-version: [16.x, 18.x, 20.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} From 8784b114c1c2cfb6c84ad30c802da48a7c2ad6e3 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 21 Oct 2023 16:28:19 +0200 Subject: [PATCH 3/6] Use v3 actions, cancel in progress CI for branches --- .github/workflows/node.js.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index afbaa05..be5508a 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [ master ] +concurrency: + group: ${{ github.ref }} + cancel-in-progress: ${{ github.ref_name == 'master' }} + jobs: build: @@ -15,9 +19,9 @@ jobs: matrix: node-version: [16.x, 18.x, 20.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - run: npm install From 1fbf8e6788254181f1cf1ecd307058cbbf69571c Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 21 Oct 2023 17:30:24 +0200 Subject: [PATCH 4/6] Timeout 10 minutes --- .github/workflows/node.js.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index be5508a..1bb641f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -14,16 +14,21 @@ jobs: build: runs-on: ubuntu-latest + timeout-minutes: 10 strategy: matrix: node-version: [16.x, 18.x, 20.x] steps: - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm run lint + - run: npm test From 0fbcdaa45ac5c9768dda67cdcfae75929c6d0c70 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 21 Oct 2023 17:33:21 +0200 Subject: [PATCH 5/6] Ignore test under Node 20 --- test/tile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tile.js b/test/tile.js index 3d6961c..aa99280 100644 --- a/test/tile.js +++ b/test/tile.js @@ -34,8 +34,8 @@ describe('#Tile()', function () { describe('#render()', function () { it('should render a PNG of the world', function (done) { - if (process.version.startsWith('v10')) { - // PNG output is not exactly the same in node v10 + if (process.version.startsWith('v20')) { + // PNG output is not exactly the same in node v20 this.skip(); } var tile = new Tile(0, 0, 0); From c91d8695bd67ad245e056c4ef4f7c3a51e30fc95 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sat, 21 Oct 2023 17:37:15 +0200 Subject: [PATCH 6/6] Note minimum Node and NPM versions --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bb85559..30de979 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,8 @@ "author": "Yohan Boniface", "license": "WTFPL", "engines": { - "npm": ">=1.5.0", - "node": ">=6.9.0" + "npm": ">=8.0.0", + "node": ">=16.0.0" }, "dependencies": { "carto": "^1.2.0",