-
-
Notifications
You must be signed in to change notification settings - Fork 22
84 lines (70 loc) · 2.15 KB
/
backend.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Check backend
on:
push:
paths:
- '.github/workflows/backend.yml'
- 'src-tauri/**'
pull_request:
paths:
- '.github/workflows/backend.yml'
- 'src-tauri/**'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/cargo@v1
name: Rustfmt check
with:
command: fmt
args: --manifest-path ./src-tauri/Cargo.toml --all -- --check
# also check updater
- uses: actions-rs/cargo@v1
name: Rustfmt check updater
with:
command: fmt
args: --manifest-path ./updater/Cargo.toml --all -- --check
clippy:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.7
- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- uses: Swatinem/rust-cache@v1
with:
working-directory: src-tauri
- name: Build frontend (creates '../dist')
run: pnpm install && pnpm shupdate && pnpm prebuild && pnpm build
- uses: actions-rs/clippy-check@v1
name: Clippy check
with:
name: clippy (${{ runner.os }})
token: ${{ secrets.GITHUB_TOKEN }}
args: --manifest-path ./src-tauri/Cargo.toml --no-default-features -- -D warnings
# Also clippy check updater
- uses: actions-rs/clippy-check@v1
name: Clippy check updater
with:
name: clippy (${{ runner.os }})
token: ${{ secrets.GITHUB_TOKEN }}
args: --manifest-path ./updater/Cargo.toml --no-default-features -- -D warnings