-
Notifications
You must be signed in to change notification settings - Fork 84
63 lines (50 loc) · 1.36 KB
/
check.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
name: Check
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
check_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
- name: Required Dependencies
run: |
sudo apt update
sudo apt install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
run: npm install -g pnpm
# This step is required to run following steps, as they require the `dist` directory
- name: Build frontend
run: pnpm install --no-frozen-lockfile && pnpm build
- name: Check formatting
run: |
cd src-tauri
cargo fmt --all -- --check
cd ..
- name: Test Tauri
run: |
cd src-tauri
cargo test --all-features
cd ..
- name: Clippy
run: |
cd src-tauri
cargo clippy -- -D warnings
cd ..