From 3ff4640dccf2e82cfe17a421b49f00af1b5efd1e Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman Date: Thu, 1 Apr 2021 17:48:47 -0400 Subject: [PATCH 1/4] Implement GH actions --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..498a002a2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: Node.js CI +on: [push, pull_request] + +jobs: + test: + strategy: + matrix: + node: [12.x, 13.x, 14.x, 15.x] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - run: npm install + - run: npm test From a4027b5b110f145cda4bfa00b837e70bf109b4d2 Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman Date: Wed, 21 Apr 2021 13:02:46 -0400 Subject: [PATCH 2/4] Only build pushes to master --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 498a002a2..0a6c0a59a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,8 @@ name: Node.js CI -on: [push, pull_request] +on: + push: + branches: master + pull_request: jobs: test: From a7bb1fac7cda45fcfe62b2839648a7e894b563ff Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman Date: Sat, 24 Apr 2021 13:50:30 -0400 Subject: [PATCH 3/4] Don't test Node's own behavior --- lib/ensure/__tests__/symlink.test.js | 32 ---------------------------- 1 file changed, 32 deletions(-) diff --git a/lib/ensure/__tests__/symlink.test.js b/lib/ensure/__tests__/symlink.test.js index 0c951efa3..5292904d0 100644 --- a/lib/ensure/__tests__/symlink.test.js +++ b/lib/ensure/__tests__/symlink.test.js @@ -304,22 +304,6 @@ describe('fse-ensure-symlink', () => { }) } - describe('fs.symlink()', () => { - const fn = fs.symlink - tests.forEach(test => { - const args = test[0].slice(0) - const nativeBehavior = test[1] - // const newBehavior = test[2] - if (nativeBehavior === 'file-success') fileSuccess(args, fn) - if (nativeBehavior === 'file-broken') fileBroken(args, fn) - if (nativeBehavior === 'file-error') fileError(args, fn) - args.push('dir') - if (nativeBehavior === 'dir-success') dirSuccess(args, fn) - if (nativeBehavior === 'dir-broken') dirBroken(args, fn) - if (nativeBehavior === 'dir-error') dirError(args, fn) - }) - }) - describe('ensureSymlink()', () => { const fn = ensureSymlink tests.forEach(test => { @@ -358,22 +342,6 @@ describe('fse-ensure-symlink', () => { }) }) - describe('fs.symlinkSync()', () => { - const fn = fs.symlinkSync - tests.forEach(test => { - const args = test[0].slice(0) - const nativeBehavior = test[1] - // const newBehavior = test[2] - if (nativeBehavior === 'file-success') fileSuccessSync(args, fn) - if (nativeBehavior === 'file-broken') fileBrokenSync(args, fn) - if (nativeBehavior === 'file-error') fileErrorSync(args, fn) - args.push('dir') - if (nativeBehavior === 'dir-success') dirSuccessSync(args, fn) - if (nativeBehavior === 'dir-broken') dirBrokenSync(args, fn) - if (nativeBehavior === 'dir-error') dirErrorSync(args, fn) - }) - }) - describe('ensureSymlinkSync()', () => { const fn = ensureSymlinkSync tests.forEach(test => { From d71114938cda16ca81dca439815cf0488b081c72 Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman Date: Thu, 29 Apr 2021 14:26:37 -0400 Subject: [PATCH 4/4] Test on Node 16 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a6c0a59a..dc2e126af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: test: strategy: matrix: - node: [12.x, 13.x, 14.x, 15.x] + node: [12.x, 13.x, 14.x, 15.x, 16.x] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: