-
-
Notifications
You must be signed in to change notification settings - Fork 13
53 lines (49 loc) · 1.31 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
name: Test backend
on:
push:
branches:
- main
- dev
paths-ignore:
- "*.md"
- "LICENSE"
pull_request:
branches:
- main
- dev
paths-ignore:
- "*.md"
- "LICENSE"
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: [self-hosted, Linux]
container: rust:1.73
defaults:
run:
working-directory: ./src-tauri
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Debug
run: echo ${{ github.ref_name }}
- name: Cache
uses: Swatinem/rust-cache@v2
- name: install linux deps
run: |
apt-get update
apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev unzip
- name: install protobuf compiler
run: |
PB_REL='https://github.com/protocolbuffers/protobuf/releases'
PB_VERSION='3.20.0' && curl -LO $PB_REL/download/v$PB_VERSION/protoc-$PB_VERSION-linux-x86_64.zip
unzip protoc-$PB_VERSION-linux-x86_64.zip bin/protoc include/google/* -d /usr/local
- name: Check format
run: |
rustup component add rustfmt
cargo fmt -- --check
- name: Run tests
run: cargo test --locked --no-fail-fast