Skip to content

Commit 8929dcb

Browse files
authored
Merge pull request #99 from semi-technologies/migrate_tests_to_gh
Migrate CI to github actions
2 parents 94bad54 + 9aca9c4 commit 8929dcb

File tree

2 files changed

+40
-20
lines changed

2 files changed

+40
-20
lines changed

.github/workflows/tests.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
tags:
6+
- '**'
7+
pull_request:
8+
9+
10+
jobs:
11+
tests:
12+
name: Tests
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: '16.x'
19+
- name: "Run tests"
20+
run: |
21+
npm install
22+
ci/run_dependencies.sh
23+
npm test
24+
ci/stop_dependencies.sh
25+
npm run build
26+
deploy:
27+
needs: Tests
28+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v3
32+
# Setup .npmrc file to publish to npm
33+
- uses: actions/setup-node@v3
34+
with:
35+
node-version: '16.x'
36+
registry-url: 'https://registry.npmjs.org'
37+
- run: npm ci && npm run build
38+
- run: npm publish
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)