Skip to content

Commit

Permalink
chore: run tests on Node.js 18
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Koops <[email protected]>
  • Loading branch information
jonkoops authored and rolandjitsu committed Nov 11, 2024
1 parent 69fafa4 commit 9d9322d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22]
node-version: [18, 20, 22]

steps:
- name: Checkout repository
Expand All @@ -29,20 +29,13 @@ jobs:
run: npm ci

- name: Run tests
if: matrix.node-version != 22
run: npm test

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

coverage:
name: Publish coverage
needs: test
runs-on: ubuntu-latest
steps:
- name: Publish coverage
- name: Collect coverage
if: matrix.node-version == 22
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,3 @@ accept({
## Contributing

Checkout the organization [CONTRIBUTING.md](https://github.com/react-dropzone/.github/blob/main/CONTRIBUTING.md).

**NOTE** The minimum required Node version for development is v20.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"scripts": {
"prepublish": "npm test",
"pretest": "npm run lint",
"test": "node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info",
"test": "node --test",
"test:coverage": "node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info",
"test:watch": "node --test --watch",
"lint": "eslint src/ test/",
"lint:fix": "eslint --fix src/ test/",
Expand Down

0 comments on commit 9d9322d

Please sign in to comment.