From 64af3636e52a75a8a0c7423c1043c628b762bd47 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Fri, 29 May 2020 22:56:14 -0700 Subject: [PATCH] chore: import Action script --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 50 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 0000000..58fe1f9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: CI + +on: [push, pull_request] + +jobs: + test: + name: Node.js v${{ matrix.nodejs }} + runs-on: ubuntu-latest + strategy: + matrix: + nodejs: [10, 12] + steps: + - uses: actions/checkout@master + with: + fetch-depth: 1 + + - 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: (lerna) restore + uses: actions/cache@master + with: + path: | + node_modules + */*/node_modules + key: ${{ runner.os }}-${{ hashFiles('**/package.json') }} + + - name: Install + run: | + pnpm install + pnpm add -g nyc + + - name: Build + run: pnpm run build + + - name: Test w/ Coverage + run: nyc --include=packages 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 }} diff --git a/.gitignore b/.gitignore index 95893b6..9c94371 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules .DS_Store +*-lock.* *.lock *.log dist