forked from silvermine/tauri-plugin-sqlite
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (59 loc) · 2.11 KB
/
ci.yml
File metadata and controls
71 lines (59 loc) · 2.11 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
name: CI
on:
push: # Runs on push to any branch
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
ci:
name: Continuous Integration
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: '1.89.0'
components: rustfmt, clippy
cache: true
- name: Install npm dependencies
run: npm ci
- name: Run standards checks
run: |
# Determine commitlint range
if [ "${{ github.event_name }}" = "pull_request" ]; then
export COMMITLINT_FROM="${{ github.event.pull_request.base.sha }}"
else
# For pushes, verify the before commit exists
if git cat-file -e "${{ github.event.before }}" 2>/dev/null; then
export COMMITLINT_FROM="${{ github.event.before }}"
else
# Fallback: check only HEAD commit on force push or first push
export COMMITLINT_FROM="HEAD~1"
fi
fi
npm run standards
- name: Run cargo check
run: cargo check --workspace --all-targets
- name: Build example apps
run: |
for example in examples/*/; do
echo "Building $example..."
(cd "$example" && npm ci && npm run build)
cargo check --manifest-path "${example}src-tauri/Cargo.toml"
done
- name: Run TypeScript and Rust tests
run: npm test