From b187a549c7ada4c0a224fcca4556554dacd3ed5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 1 May 2020 16:18:59 +0200 Subject: [PATCH] ci: update GitHub actions workflow - Use Node.js 14 in actions/setup-node - Add Node.js 14.x to the test matrix - Remove CI: true from the environment The variable is already set by GitHub - Fix bug in test fixture Discovered with v14.x because of https://github.com/nodejs/node/pull/31030. --- .github/workflows/nodejs.yml | 8 +++----- test/fixtures/omg-i-write-to-tmpdir/test.js | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 99aaeb412..99250514a 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js 13 + - name: Use Node.js 14 uses: actions/setup-node@v1 with: - node-version: 13 + node-version: 14.x - name: npm install and lint run: | npm install @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [10.x, 12.x, 13.x] + node-version: [10.x, 12.x, 13.x, 14.x] os: [ubuntu-latest, windows-latest, macOS-latest] runs-on: ${{ matrix.os }} steps: @@ -40,7 +40,5 @@ jobs: run: | npm install npm run tap -- --coverage-report=lcov - env: - CI: true - name: Upload coverage report to Codecov uses: codecov/codecov-action@v1 diff --git a/test/fixtures/omg-i-write-to-tmpdir/test.js b/test/fixtures/omg-i-write-to-tmpdir/test.js index 324692387..663cc65c3 100644 --- a/test/fixtures/omg-i-write-to-tmpdir/test.js +++ b/test/fixtures/omg-i-write-to-tmpdir/test.js @@ -4,4 +4,4 @@ const { join } = require('path'); const { tmpdir } = require('os'); const { writeFileSync } = require('fs'); -writeFileSync(join(tmpdir(), 'omg-i-write-to-tmpdir-testfile')); +writeFileSync(join(tmpdir(), 'omg-i-write-to-tmpdir-testfile'), '');