Skip to content

Commit 39fe3bf

Browse files
Create tests workflow
1 parent 0186051 commit 39fe3bf

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/tests.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
name: Build
14+
runs-on: ubuntu-latest
15+
steps:
16+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
17+
- uses: actions/checkout@v3
18+
19+
- name: Install Dependencies
20+
run: npm ci
21+
22+
- name: Build
23+
run: npm run build
24+
25+
- name: Cache lib
26+
uses: actions/cache@v3
27+
with:
28+
path: lib
29+
key: ${{ runner.os }}-ipos-lib-${{ github.sha }}
30+
31+
test:
32+
name: Test
33+
runs-on: ubuntu-latest
34+
steps:
35+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
36+
- uses: actions/checkout@v3
37+
38+
- name: Cache lib
39+
uses: actions/cache@v3
40+
with:
41+
path: lib
42+
key: ${{ runner.os }}-ipos-lib-${{ github.sha }}
43+
44+
- name: Run Tests
45+
run: npm run test
46+
47+
- name: Coveralls
48+
uses: coverallsapp/github-action@master
49+
with:
50+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)