-
Notifications
You must be signed in to change notification settings - Fork 8
121 lines (97 loc) · 3.84 KB
/
Copy pathquality.yml
File metadata and controls
121 lines (97 loc) · 3.84 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
name: Quality
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: quality-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
frontend:
name: Frontend quality
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
version: 11.10.0
run_install: false
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check version consistency
run: pnpm version:check
- name: Lint frontend and scripts
run: pnpm lint
- name: Check TypeScript project references
run: pnpm type-check
- name: Run unit tests
run: pnpm test
- name: Audit production dependencies
run: pnpm audit --prod
- name: Build frontend
run: pnpm build
rust:
name: Rust quality (${{ matrix.name }})
runs-on: ${{ matrix.os }}
timeout-minutes: ${{ matrix.timeout_minutes }}
strategy:
fail-fast: false
matrix:
include:
- name: macOS
os: macos-14
timeout_minutes: 45
- name: Windows
os: windows-2022
# A cold Windows cache must compile many native dependencies. Allow enough time for runner variance.
# This timeout only stops stalled jobs and does not delay builds that finish normally.
timeout_minutes: 90
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pinned Rust toolchain
run: rustup show
- name: Cache Rust build artifacts
# Cache Cargo dependencies and target artifacts per platform so every run does not rebuild from scratch.
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Check formatting
if: matrix.name == 'macOS'
run: cargo fmt --all -- --check
- name: Check Rust workspace
run: cargo check --workspace --locked
- name: Lint Rust workspace
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Run Rust tests (macOS)
if: matrix.name == 'macOS'
run: cargo test --workspace --locked
- name: Run Rust tests (Windows)
if: matrix.name == 'Windows'
# The dedicated Cargo configuration embeds the Common Controls v6 dependency into x64 Windows test
# executables so every library test, including Tauri plugins, can resolve TaskDialogIndirect at startup.
# Limit this job to library targets because manual audio examples require physical devices.
run: cargo --config .cargo/windows-tests.toml test --workspace --locked --lib
- name: Check generated TypeScript bindings
if: matrix.name == 'macOS'
run: git diff --exit-code -- 'src-tauri/plugins/*/js/bindings.gen.ts'
rust-dependency-policy:
name: Rust dependency policy
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Check advisories, licenses, and sources
# Pin cargo-deny-action v2.0.18 by commit so a mutable third-party tag cannot change CI behavior.
uses: EmbarkStudios/cargo-deny-action@6c8f9facfa5047ec02d8485b6bf52b587b7777d1 # v2.0.18
with:
command: check advisories licenses sources
arguments: ''
rust-version: '1.88.0'