-
Notifications
You must be signed in to change notification settings - Fork 4
100 lines (81 loc) · 2.39 KB
/
Copy pathci.yml
File metadata and controls
100 lines (81 loc) · 2.39 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
96
97
98
99
100
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
frontend:
name: Frontend build
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Set up pnpm
uses: pnpm/action-setup@v6
with:
version: 10.33.0
run_install: false
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
package-manager-cache: false
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Check application version consistency
run: pnpm version:check
- name: Build TypeScript frontend
run: pnpm build
rust:
name: Rust checks (${{ matrix.platform }})
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform:
- ubuntu-22.04
- windows-latest
- macos-15
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Set up stable Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Set up Rust build cache
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
shared-key: ci-${{ matrix.platform }}
- name: Install Linux system dependencies
if: matrix.platform == 'ubuntu-22.04'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
xdg-utils
- name: Check Rust formatting
if: matrix.platform == 'ubuntu-22.04'
run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
- name: Run Clippy
run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features --locked -- -D warnings
- name: Run Rust tests
run: cargo test --manifest-path src-tauri/Cargo.toml --all-targets --all-features --locked