Skip to content

Commit

Permalink
chore: add pull request and ci workflow (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
timkurvers authored May 26, 2020
1 parent 54632f6 commit 3710a7c
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI
on:
push:
branches:
- master
jobs:
lint-and-test:
name: lint and test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
- run: npm test
env:
CI: true

test-coverage:
name: test coverage (12.x)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm run test:coverage
- uses: codecov/codecov-action@v1

build:
name: build (12.x)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm run build
42 changes: 42 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Pull Request
on: [pull_request]
jobs:
lint-and-test:
name: lint and test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
- run: npm test
env:
CI: true

test-coverage:
name: test coverage (12.x)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm run test:coverage
- uses: codecov/codecov-action@v1

build:
name: build (12.x)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm run build

0 comments on commit 3710a7c

Please sign in to comment.