Skip to content

Commit 9d9322d

Browse files
jonkoopsrolandjitsu
authored andcommitted
chore: run tests on Node.js 18
Signed-off-by: Jon Koops <[email protected]>
1 parent 69fafa4 commit 9d9322d

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
node-version: [20, 22]
17+
node-version: [18, 20, 22]
1818

1919
steps:
2020
- name: Checkout repository
@@ -29,20 +29,13 @@ jobs:
2929
run: npm ci
3030

3131
- name: Run tests
32+
if: matrix.node-version != 22
3233
run: npm test
3334

34-
- name: Collect coverage
35-
uses: coverallsapp/github-action@v2
36-
with:
37-
flag-name: run-${{ join(matrix.*, '-') }}
38-
parallel: true
35+
- name: Run tests with coverage
36+
if: matrix.node-version == 22
37+
run: npm run test:coverage
3938

40-
coverage:
41-
name: Publish coverage
42-
needs: test
43-
runs-on: ubuntu-latest
44-
steps:
45-
- name: Publish coverage
39+
- name: Collect coverage
40+
if: matrix.node-version == 22
4641
uses: coverallsapp/github-action@v2
47-
with:
48-
parallel-finished: true

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,3 @@ accept({
4646
## Contributing
4747

4848
Checkout the organization [CONTRIBUTING.md](https://github.com/react-dropzone/.github/blob/main/CONTRIBUTING.md).
49-
50-
**NOTE** The minimum required Node version for development is v20.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"scripts": {
1515
"prepublish": "npm test",
1616
"pretest": "npm run lint",
17-
"test": "node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info",
17+
"test": "node --test",
18+
"test:coverage": "node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info",
1819
"test:watch": "node --test --watch",
1920
"lint": "eslint src/ test/",
2021
"lint:fix": "eslint --fix src/ test/",

0 commit comments

Comments
 (0)