-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from pelias/actions
add github actions workflow to replace travis/circle-ci
- Loading branch information
Showing
2 changed files
with
41 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Continuous Integration | ||
on: push | ||
jobs: | ||
unit-tests: | ||
runs-on: '${{ matrix.os }}' | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-20.04 | ||
node-version: | ||
- 12.x | ||
- 14.x | ||
- 16.x | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 'Install node.js ${{ matrix.node-version }}' | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: '${{ matrix.node-version }}' | ||
- name: Run unit tests | ||
run: | | ||
npm install | ||
npm run travis | ||
npm-publish: | ||
needs: unit-tests | ||
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install node.js 12.x | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: 12.x | ||
- name: Run semantic-release | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_SEMANTIC_RELEASE_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: > | ||
if [[ -n "$GH_TOKEN" && -n "$NPM_TOKEN" ]]; then | ||
curl "https://raw.githubusercontent.com/pelias/ci-tools/master/semantic-release.sh" | bash - | ||
fi |
This file was deleted.
Oops, something went wrong.