name: CI on: [push, pull_request] jobs: test: name: Node.js v${{ matrix.nodejs }} runs-on: ubuntu-latest strategy: matrix: nodejs: [6, 8, 10, 12] steps: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: node-version: ${{ matrix.nodejs }} - name: (env) pnpm run: curl -L https://raw.githubusercontent.com/pnpm/self-installer/master/install.js | node - name: (cache) restore uses: actions/cache@master with: path: node_modules key: ${{ runner.os }}-${{ hashFiles('package.json') }} - name: Install run: | pnpm install pnpm add -g nyc - name: Test w/ Coverage run: nyc --include=src pnpm test - name: Report if: matrix.nodejs >= 12 run: | nyc report --reporter=text-lcov > coverage.lcov bash <(curl -s https://codecov.io/bash) env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}