From 5463edf84468e9d42963da28e59a64bde86f64c3 Mon Sep 17 00:00:00 2001 From: Ben Monro Date: Sun, 1 Mar 2020 11:22:20 -0800 Subject: [PATCH 1/8] Create test.yml --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..05c96df945 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: Compressed Size + +on: + push: + branches: + - 'master' + pull_request: + +jobs: + test: + name: 'node ${{ matrix.node }} ${{ matrix.os }} ' + runs-on: '${{ matrix.os }}' + strategy: + matrix: + os: [ubuntu-latest] + node: [12, 10] + steps: + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - uses: actions/checkout@v2-beta + with: + fetch-depth: 1 + - run: npm ci + - run: npm run test:ci From 2e193845ff0c8b18dc392e84d1469acce0775cb9 Mon Sep 17 00:00:00 2001 From: Ben Monro Date: Sun, 1 Mar 2020 11:23:39 -0800 Subject: [PATCH 2/8] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05c96df945..80c2665283 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,5 +21,5 @@ jobs: - uses: actions/checkout@v2-beta with: fetch-depth: 1 - - run: npm ci + - run: npm i - run: npm run test:ci From 80bdba04250dcbb002b48624bc527e76a66de5de Mon Sep 17 00:00:00 2001 From: Ben Monro Date: Sun, 1 Mar 2020 11:38:07 -0800 Subject: [PATCH 3/8] added jest config --- jest.config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 jest.config.js diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000000..1cf20aecef --- /dev/null +++ b/jest.config.js @@ -0,0 +1,11 @@ +module.exports = { + // "coverageThreshold": { + // "global": { + // "branches": 80, + // "functions": 80, + // "lines": 80, + // "statements": -10 + // } + // } + coverageReporters =["json", "lcov", "text", "clover", "text-summary"] +} From 1bd117c05f63496c03da7ad183d14f1879cbcaf4 Mon Sep 17 00:00:00 2001 From: Ben Monro Date: Sun, 1 Mar 2020 11:39:47 -0800 Subject: [PATCH 4/8] fixed typo --- jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index 1cf20aecef..52683f5ff5 100644 --- a/jest.config.js +++ b/jest.config.js @@ -7,5 +7,5 @@ module.exports = { // "statements": -10 // } // } - coverageReporters =["json", "lcov", "text", "clover", "text-summary"] + coverageReporters: ["json", "lcov", "text", "clover", "text-summary"] } From 8c023a8e87dc03efe88662b0b6a89f8a6444847e Mon Sep 17 00:00:00 2001 From: Ben Monro Date: Sun, 1 Mar 2020 11:44:43 -0800 Subject: [PATCH 5/8] covg threshold --- .github/workflows/test.yml | 2 +- jest.config.js | 17 +++++++++-------- package.json | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80c2665283..559ba565eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Compressed Size +name: Run Tests on: push: diff --git a/jest.config.js b/jest.config.js index 52683f5ff5..ce496f020a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,11 +1,12 @@ module.exports = { - // "coverageThreshold": { - // "global": { - // "branches": 80, - // "functions": 80, - // "lines": 80, - // "statements": -10 - // } - // } + "coverageThreshold": { + "global": { + "branches": 65.38, + "functions": 67.65, + "lines": 72.75, + "statements": 71.54 + } + }, + collectCoverage: true, coverageReporters: ["json", "lcov", "text", "clover", "text-summary"] } diff --git a/package.json b/package.json index 7644b48965..c1a08a6341 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "test": "is-ci \"test:ci\" \"test:dev\"", "test:dev": "jest --watch", "test:ci": "yarn test:jest", - "test:jest": "jest --coverage", + "test:jest": "jest", "test:coverage": "yarn test:jest; open coverage/lcov-report/index.html", "build": "NODE_ENV=production rollup -c", "now-build": "yarn && cd www && yarn && yarn build", From aa3b00d36c942800268bc5c19e9542ecfe2802bd Mon Sep 17 00:00:00 2001 From: Ben Monro Date: Sun, 1 Mar 2020 11:50:30 -0800 Subject: [PATCH 6/8] consolidating package.json --- .github/workflows/test.yml | 5 +++-- package.json | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 559ba565eb..f25eb23090 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,5 +21,6 @@ jobs: - uses: actions/checkout@v2-beta with: fetch-depth: 1 - - run: npm i - - run: npm run test:ci + - run: npm i -g yarn + - run: yarn + - run: yarn test:ci diff --git a/package.json b/package.json index c1a08a6341..2c09ba5c40 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,8 @@ "scripts": { "test": "is-ci \"test:ci\" \"test:dev\"", "test:dev": "jest --watch", - "test:ci": "yarn test:jest", - "test:jest": "jest", - "test:coverage": "yarn test:jest; open coverage/lcov-report/index.html", + "test:ci": "jest", + "test:coverage": "yarn test:ci; open coverage/lcov-report/index.html", "build": "NODE_ENV=production rollup -c", "now-build": "yarn && cd www && yarn && yarn build", "start": "rollup -c -w", From 5526bdd3390de095c9e0a7a04f276550e551b51a Mon Sep 17 00:00:00 2001 From: Ben Monro Date: Sun, 1 Mar 2020 11:52:54 -0800 Subject: [PATCH 7/8] frozen lockfile --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f25eb23090..79e2123cd1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,5 +22,5 @@ jobs: with: fetch-depth: 1 - run: npm i -g yarn - - run: yarn + - run: yarn --frozen-lockfile - run: yarn test:ci From 85178744590c456c116b014308aac30f8b1fab9a Mon Sep 17 00:00:00 2001 From: Ben Monro Date: Sun, 1 Mar 2020 11:57:19 -0800 Subject: [PATCH 8/8] rename tests for badge --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79e2123cd1..a3b6e0dd07 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Run Tests +name: react-query tests on: push: