From 21b01f4b80ecfbfa77a63f22649b497f0b722069 Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman <17342435+RyanZim@users.noreply.github.com> Date: Sat, 1 May 2021 10:52:10 -0400 Subject: [PATCH] Implement GH actions (#881) * Implement GH actions * Only build pushes to master * Don't test Node's own behavior * Test on Node 16 --- .github/workflows/ci.yml | 21 ++++++++++++++++++ lib/ensure/__tests__/symlink.test.js | 32 ---------------------------- 2 files changed, 21 insertions(+), 32 deletions(-) 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..dc2e126af --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: Node.js CI +on: + push: + branches: master + pull_request: + +jobs: + test: + strategy: + matrix: + node: [12.x, 13.x, 14.x, 15.x, 16.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 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 => {