Skip to content

Commit

Permalink
Build: Use GitHub Actions for CI/CD (#255)
Browse files Browse the repository at this point in the history
* build: Use GitHub Actions for CI/CD

* build: add github token to publish step

Co-Authored-By: Austin Cawley-Edwards <austin.cawley@gmail.com>

* build: drop travis
  • Loading branch information
keithamus committed Oct 25, 2019
1 parent 50d9db4 commit 601854f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 43 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 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}}
GITHUB_TOKEN: ${{secrets.github_token}}
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

0 comments on commit 601854f

Please sign in to comment.