-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (90 loc) · 2.55 KB
/
Copy pathtest.yml
File metadata and controls
95 lines (90 loc) · 2.55 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Tests
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Install system dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y \
cmake \
pkg-config \
libglib2.0-dev \
libwebkit2gtk-4.1-dev \
libssl-dev \
libxdo-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Test shared crate
run: cargo test -p shared --verbose
- name: Test android crate
run: cargo test -p mavivpn --verbose
- name: Test backend
run: cargo test -p mavi-vpn --verbose
- name: Test linux client
run: cargo test -p linux-vpn --verbose
- name: Test quic-tester
run: cargo test -p quic-tester --verbose
- name: Test GUI backend
run: cargo test -p mavi-vpn-gui --verbose
test-windows:
name: Windows Unit Tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Test windows crate
run: cargo test -p windows-vpn --verbose
test-gui:
name: GUI Frontend Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: gui
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: gui/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run frontend tests
run: npm test