-
Notifications
You must be signed in to change notification settings - Fork 3
125 lines (103 loc) · 3.06 KB
/
Copy pathfluxby-pr-check.yml
File metadata and controls
125 lines (103 loc) · 3.06 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: 'Fluxby PR Check'
on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Fast checks - runs on every PR
lint-test:
name: Lint, Typecheck & Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build packages (required for typecheck)
run: npm run build:packages
- name: Lint
run: npm run lint
- name: Type check
run: npm run typecheck
- name: Run tests with coverage
run: npm run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage-final.json
fail_ci_if_error: false
verbose: true
# Check which paths changed for conditional Tauri builds
changes:
name: Detect Changes
runs-on: ubuntu-latest
outputs:
tauri: ${{ steps.filter.outputs.tauri }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Check for Tauri-related changes
uses: dorny/paths-filter@v4
id: filter
with:
filters: |
tauri:
- 'apps/tauri/**'
- 'apps/web/**'
- 'packages/**'
- '.github/workflows/fluxby-release.yml'
- '.github/workflows/fluxby-pr-check.yml'
# Tauri build check - only for relevant paths
tauri-build:
name: Tauri Build (${{ matrix.platform }})
needs: [lint-test, changes]
if: needs.changes.outputs.tauri == 'true'
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '22'
cache: 'npm'
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev
- name: Install dependencies
run: npm ci
- name: Build packages
run: npm run build:packages
- name: Build web app
run: npm run build:web
- name: Check Rust compilation
working-directory: apps/tauri
run: cargo check
- name: Build Tauri app (debug)
working-directory: apps/tauri
run: npx tauri build --debug --config tauri.debug.conf.json