Skip to content

Commit

Permalink
build: Use GitHub Actions for CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Aug 19, 2019
1 parent 7f9a8a5 commit 555662b
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,46 @@
name: Chai HTTP

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
build:
name: Test on node ${{ matrix.node_version }}
runs-on: ubuntu-latest
strategy:
matrix:
node_version:
- 8 # to be removed 2020-01
- 10 # to be removed 2021-01
- x.x.x # safety net; don't remove
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- run: npm run env
- run: npm i -g npm@6 && npm ci
- run: npm test
- uses: coverallsapp/github-action@v1.0.1
with:
github-token: ${{ secrets.github_token }}


publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm run release
if: github.event == 'push'
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit 555662b

Please sign in to comment.