From c546279d89067edd8397ad69f1a0ba511a23c037 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 14 Aug 2019 11:43:25 +0300 Subject: [PATCH 1/2] Setup github actions CI --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ README.md | 3 +++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..70be437d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build + +on: [push, pull_request] + +jobs: + build: + name: Node ${{ matrix.node_version }} on ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + node_version: [ + 10.x, # EOL: April 2021 + 12.x, # EOL: April 2022 + ] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@master + + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node_version }} + + - name: Install + run: yarn --frozen-lockfile --non-interactive + + - name: Build + run: yarn build + env: + NODE_ENV: production + + - name: Test + run: yarn test diff --git a/README.md b/README.md index 524eceae..16b8a71a 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,9 @@ Travis CI Build Status + Build Status Dependencies Status From 9eff3b51d7dd823a96b2e228d60fec75ae2d924d Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 14 Aug 2019 12:01:01 +0300 Subject: [PATCH 2/2] Allow extra slash on Windows in expandHome tests Github CI on Windows ends up formatting it as 'd:\\tmp', this causes no issues besides the failing test --- test/src/helperTest.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/src/helperTest.js b/test/src/helperTest.js index 65583f41..0eb827c5 100644 --- a/test/src/helperTest.js +++ b/test/src/helperTest.js @@ -21,11 +21,13 @@ describe("Helper", function() { }); it("should not expand paths not starting with tilde", function() { - expect(Helper.expandHome("/tmp")).to.match(/^\/tmp|[A-Z]:\\tmp$/); + expect(Helper.expandHome("/tmp")).to.match(/^\/tmp|[a-zA-Z]:\\{1,2}tmp$/); }); it("should not expand a tilde in the middle of a string", function() { - expect(Helper.expandHome("/tmp/~foo")).to.match(/^\/tmp\/~foo|[A-Z]:\\tmp\\~foo$/); + expect(Helper.expandHome("/tmp/~foo")).to.match( + /^\/tmp\/~foo|[a-zA-Z]:\\{1,2}?tmp\\{1,2}~foo$/ + ); }); it("should return an empty string when given an empty string", function() {