-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Use GitHub Actions instead of CircleCI
- Loading branch information
Showing
3 changed files
with
56 additions
and
66 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,48 @@ | ||
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge. | ||
name: ci-tests | ||
|
||
# Trigger the workflow when: | ||
on: | ||
# A push occurs to one of the matched branches. | ||
push: | ||
branches: | ||
- master | ||
# Or when a pull request event occurs for a pull request against one of the | ||
# matched branches. | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
# NOTE: This name appears in GitHub's Checks API. | ||
name: tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
# Check out pull request's HEAD commit instead of the merge commit to | ||
# work-around an issue where wrong a commit is being checked out. | ||
# For more details, see: | ||
# https://github.com/actions/checkout/issues/299. | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Install needed system packages | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y libusb-1.0.0 libudev-dev | ||
- name: Set up Node.js 12 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
|
||
- name: Build code | ||
run: | | ||
yarn install | ||
yarn build | ||
- name: Run tests | ||
run: | | ||
yarn test:unit |
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