From c5ee23e76884c6f3dca1939bd16d9608cd46802f Mon Sep 17 00:00:00 2001 From: Smittyvb Date: Mon, 11 Jan 2021 12:09:55 -0500 Subject: [PATCH 1/8] Test on Github Actions --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 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 00000000..a23e41cd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: CI +on: [push, pull_request] +jobs: + Tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + node-version: [ '8', '10', '12', '14' ] + os: [ubuntu-latest, windows-latest, macOS-latest] + name: Test on Node v${{ matrix.node-version }} + steps: + - uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm run all + env: + CI: true From e9698d9d8673c4d8d59f4239b83b035ff207e24a Mon Sep 17 00:00:00 2001 From: Smittyvb Date: Mon, 11 Jan 2021 12:12:14 -0500 Subject: [PATCH 2/8] Include the OS used in the build name --- .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 a23e41cd..58071d73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: matrix: node-version: [ '8', '10', '12', '14' ] os: [ubuntu-latest, windows-latest, macOS-latest] - name: Test on Node v${{ matrix.node-version }} + name: Test on Node v${{ matrix.node-version }} on ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup node From bfd49f0ffcaf49f3ff6cbac865902d8b8470af13 Mon Sep 17 00:00:00 2001 From: Smittyvb Date: Mon, 11 Jan 2021 12:17:23 -0500 Subject: [PATCH 3/8] Don't test on MacOS due to flakyness --- .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 58071d73..5be55d90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: node-version: [ '8', '10', '12', '14' ] - os: [ubuntu-latest, windows-latest, macOS-latest] + os: [ubuntu-latest, windows-latest] name: Test on Node v${{ matrix.node-version }} on ${{ matrix.os }} steps: - uses: actions/checkout@v2 From d01b2d94cdad38a2d6036759f57758d3483759be Mon Sep 17 00:00:00 2001 From: Smittyvb Date: Mon, 11 Jan 2021 12:22:24 -0500 Subject: [PATCH 4/8] Fix tests on Windows --- test/loader.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/loader.spec.js b/test/loader.spec.js index 3195712c..c313242d 100644 --- a/test/loader.spec.js +++ b/test/loader.spec.js @@ -9,7 +9,7 @@ chai.use(sinonChai); const { expect } = chai; function d([str]) { - return str.replace(/^\t+/gm, '').trim(); + return str.replace(/^\t+/gm, '').replace(/\r/g, "").trim(); } describe('loader', () => { From 1ed6e941b38253eb98c17d59886d0c94978e4aab Mon Sep 17 00:00:00 2001 From: Smittyvb Date: Mon, 11 Jan 2021 12:27:54 -0500 Subject: [PATCH 5/8] Ignore newline differences in validation test --- test/loader.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/loader.spec.js b/test/loader.spec.js index c313242d..8204b1c4 100644 --- a/test/loader.spec.js +++ b/test/loader.spec.js @@ -88,7 +88,7 @@ describe('loader', () => { ) { expect(err).to.exist; - expect(err.message.trim()).to.eql(d` + expect(err.message.trim().replace(/\r/g, "")).to.eql(d` ValidationError: A component cannot have a default export (2:1) 1: