Skip to content

Commit

Permalink
chore: import Action script
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed May 30, 2020
1 parent 0287e40 commit 64af363
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
.DS_Store
*-lock.*
*.lock
*.log
dist

0 comments on commit 64af363

Please sign in to comment.