test: Add coverage CI workflow
MODIFY
.github/workflows/ci.yml
.github/workflows/ci.yml
@@ -110,6 +110,54 @@ jobs:
- name: Run yarn test
run: yarn test
+ cover:
+ name: cover
+ runs-on: ubuntu-latest
+
+# begin macro
+
+ strategy:
+ fail-fast: false
+ matrix:
+ node-version: [12.17.0, 12.x, 14.x]
+
+ steps:
+
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+
+ - name: Echo node version
+ run: node --version
+
+ - name: Get yarn cache directory path
+ id: yarn-cache-dir-path
+ run: echo "::set-output name=dir::$(yarn cache dir)"
+
+ - name: Cache npm modules
+ uses: actions/cache@v1
+ id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
+ with:
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-
+
+ - name: Install dependencies
+ run: yarn --frozen-lockfile
+
+# end macro
+
+ - name: Run yarn build
+ run: yarn build
+
+ - name: Run yarn cover
+ run: yarn cover
+
test262:
name: test262
runs-on: ubuntu-latest

test: Add coverage CI workflow