Skip to content

Commit 3c9ab27

Browse files
committed
Add node tests
Install, build and run frontend tests
1 parent 2486f7d commit 3c9ab27

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.github/workflows/test.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
path: |
2323
~/go/pkg/mod
2424
~/.cache
25+
**/node_modules
2526
key: ${{ runner.os }}-amd64-go-${{ hashFiles('**/go.sum') }}
2627
restore-keys: |
2728
${{ runner.os }}-amd64-go-
@@ -31,8 +32,22 @@ jobs:
3132
with:
3233
go-version: ${{ matrix.go }}
3334

34-
- name: Run main tests
35-
run: go test -v -race
35+
- name: Setup node
36+
uses: actions/setup-node@v2
37+
with:
38+
node-version: '12'
39+
40+
- name: Run Go tests
41+
run: go test -v -race . ./pkg/sd
42+
43+
- name: Install frontend deps
44+
working-directory: ./web-client
45+
run: npm install
46+
47+
- name: Build frontend
48+
working-directory: ./web-client
49+
run: npm run build
3650

37-
- name: Run pkg tests
38-
run: go test -v -race ./pkg/sd
51+
- name: Run frontend tests
52+
working-directory: ./web-client
53+
run: npm run test

0 commit comments

Comments
 (0)