From 92aa7413532c9e2d50ef1bc0d94737c9ac5f8f45 Mon Sep 17 00:00:00 2001 From: Erica Hyman Date: Fri, 27 Aug 2021 14:28:08 -0400 Subject: [PATCH 1/4] Create node.js.yml --- .github/workflows/node.js.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 00000000..15350c90 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,32 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test + - run: npm run test-browser From d0850d58882a0926dc4b2786cc3d744a3f4da166 Mon Sep 17 00:00:00 2001 From: ekh64 Date: Fri, 27 Aug 2021 14:34:56 -0400 Subject: [PATCH 2/4] remove browser test step --- .github/workflows/node.js.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 15350c90..e4bb8fcb 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,13 +5,12 @@ name: Node.js CI on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: build: - runs-on: ubuntu-latest strategy: @@ -20,13 +19,12 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test - - run: npm run test-browser + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test From b2c894adfa51c755ef8b2a2950e2f52161298883 Mon Sep 17 00:00:00 2001 From: ekh64 Date: Fri, 27 Aug 2021 16:54:53 -0400 Subject: [PATCH 3/4] CI test --- tests/jsdom/spec/AreaBarChart.spec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/jsdom/spec/AreaBarChart.spec.js b/tests/jsdom/spec/AreaBarChart.spec.js index 8dbc5cd9..f7bca648 100644 --- a/tests/jsdom/spec/AreaBarChart.spec.js +++ b/tests/jsdom/spec/AreaBarChart.spec.js @@ -53,6 +53,8 @@ describe('AreaBarChart', () => { expect(rangeRects.at(0).props().yEnd).toEqual( getValue(props.y, props.data[0]), ); + // this should fail + expect(true).toBeFalsy(); }); it('when horizontal is true', () => { From 9fa30415e56394a346e41add85490584eedec414 Mon Sep 17 00:00:00 2001 From: ekh64 Date: Fri, 27 Aug 2021 16:58:33 -0400 Subject: [PATCH 4/4] Revert "CI test" This reverts commit b2c894adfa51c755ef8b2a2950e2f52161298883. --- tests/jsdom/spec/AreaBarChart.spec.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/jsdom/spec/AreaBarChart.spec.js b/tests/jsdom/spec/AreaBarChart.spec.js index f7bca648..8dbc5cd9 100644 --- a/tests/jsdom/spec/AreaBarChart.spec.js +++ b/tests/jsdom/spec/AreaBarChart.spec.js @@ -53,8 +53,6 @@ describe('AreaBarChart', () => { expect(rangeRects.at(0).props().yEnd).toEqual( getValue(props.y, props.data[0]), ); - // this should fail - expect(true).toBeFalsy(); }); it('when horizontal is true', () => {