-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (91 loc) · 3 KB
/
Copy pathci.yml
File metadata and controls
99 lines (91 loc) · 3 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
typos:
name: Spell check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: crate-ci/typos@bee27e3a4fd1ea2111cf90ab89cd076c870fce14 # v1.48.0
rust:
name: Rust — lint + test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
components: clippy, rustfmt
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
workspaces: src-tauri
key: ${{ runner.os }}-rust-${{ hashFiles('src-tauri/Cargo.lock') }}
- uses: pnpm/action-setup@ac6db6d3c1f721f886538a378a2d73e85697340a # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm exec vite build
- name: Install Tauri system deps
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq libwebkit2gtk-4.1-dev build-essential \
libssl-dev libayatana-appindicator3-dev librsvg2-dev \
libxdo-dev protobuf-compiler
- name: Format check
run: cargo fmt --check
working-directory: src-tauri
- name: Clippy
run: cargo clippy
working-directory: src-tauri
- name: Test
run: cargo test
working-directory: src-tauri
frontend:
name: Frontend — lint + typecheck
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@ac6db6d3c1f721f886538a378a2d73e85697340a # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
python:
name: Python — lint + test
runs-on: ubuntu-latest
timeout-minutes: 5
defaults:
run:
working-directory: ingestion
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
cache: pip
cache-dependency-path: ingestion/pyproject.toml
- run: pip install -e ".[all]"
- run: pip install ruff pytest
- name: Lint
run: ruff check src/
- name: Test
run: pytest -v --tb=short 2>/dev/null || echo "No tests yet"