-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (64 loc) · 1.67 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Tests
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
jobs:
test-server:
name: Test server
runs-on: ubuntu-latest
strategy:
matrix:
test-args:
- ""
- RELEASE=1
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
name: Setup Rust
with:
profile: minimal
toolchain: stable
- uses: actions/setup-node@v2
with:
node-version: "18"
- name: Update NPM
run: npm install npm@latest -g
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ matrix.test-args }}
- name: Build client
run: SOURCING=1 . run && ${{ matrix.test-args }} build_client
- name: Compile and run tests
run: TESTS=server ${{ matrix.test-args }} ./test
test-client:
name: Test client
runs-on: ubuntu-latest
strategy:
matrix:
test-args:
- ""
- RELEASE=1
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "18"
- name: Update NPM
run: npm install npm@latest -g
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/client/package-lock.json') }}-${{ matrix.test-args }}
- name: Compile and run tests
run: TESTS=client ${{ matrix.test-args }} ./test