-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (61 loc) · 1.78 KB
/
ci.yml
File metadata and controls
74 lines (61 loc) · 1.78 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
name: CI
on:
pull_request:
branches:
- main
- development
push:
branches:
- main
- development
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache Rust build
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
curl \
wget \
file \
pkg-config \
libglib2.0-dev \
libwebkit2gtk-4.1-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf
- name: Set PKG_CONFIG_PATH for Linux
run: |
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:${PKG_CONFIG_PATH}" >> $GITHUB_ENV
- name: Install frontend dependencies
run: bun install --frozen-lockfile
- name: Check Rust formatting
working-directory: src-tauri
run: cargo fmt --all -- --check
- name: Run Clippy
working-directory: src-tauri
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build Rust code
working-directory: src-tauri
run: cargo build --release --all-features
- name: Run Rust tests
working-directory: src-tauri
run: cargo test --all-features
- name: Build frontend
run: bun run build