Skip to content

Commit

Permalink
Implement GH actions (#881)
Browse files Browse the repository at this point in the history
* Implement GH actions

* Only build pushes to master

* Don't test Node's own behavior

* Test on Node 16
  • Loading branch information
RyanZim committed May 1, 2021
1 parent 588d770 commit 21b01f4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 32 deletions.
21 changes: 21 additions & 0 deletions .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
32 changes: 0 additions & 32 deletions lib/ensure/__tests__/symlink.test.js
Expand Up @@ -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 => {
Expand Down Expand Up @@ -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 => {
Expand Down

0 comments on commit 21b01f4

Please sign in to comment.