Skip to content

Commit

Permalink
feat: remove travis; add test and publish github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
madcat78 committed Feb 16, 2021
1 parent a7c041b commit 765ff82
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 33 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish

on:
push:
branches:
- master

jobs:
test_and_publish:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-18.04, macos-10.15, windows-latest]
node: [12, 14]
env:
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Run tests
id: run_tests
run: |
npm ci
npm run test
- name: Publish
id: publish
if: matrix.node == 12
run: |
npm run binary:pack
npm run binary:publish
- name: Publish linux ARM
id: publish_linux_arm
if: matrix.os == 'ubuntu-18.04' && matrix.node == 12
run: |
TARGET_ARCH=arm npm run cross
TARGET_ARCH=arm npm run binary:publish
TARGET_ARCH=arm64 npm run cross
TARGET_ARCH=arm64 npm run binary:publish
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test

on:
push:
branches:
- '**'
- '!master'

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-18.04, macos-10.15, windows-latest]
node: [12, 14]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Run tests
id: run_tests
run: |
npm ci
npm run test
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

0 comments on commit 765ff82

Please sign in to comment.