Repository navigation
96 lines (80 loc) · 3.19 KB
/
Copy pathtests.yaml
File metadata and controls
96 lines (80 loc) · 3.19 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
name: Tests
# The gate master never had: until now nothing automated ran the suites, so a
# broken test, a missed HIGHEST_MIGRATION_ID bump (which locks users out of
# their own accounts), or a cross-crate break reached master whenever someone
# forgot to run them locally.
on:
push:
branches: [master, rehearsal]
pull_request:
workflow_dispatch:
# A newer push supersedes an in-flight run for the same ref.
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
vector-core:
name: vector-core
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
# Saved from master only: release builds need the room in the repo's 10 GB of cache.
- uses: Swatinem/rust-cache@v2
with:
workspaces: crates
save-if: ${{ github.ref == 'refs/heads/master' }}
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
# The bulk of Vector's logic, and no system dependencies: pure Rust.
# Includes `highest_migration_id_matches_the_runner`, the guard that
# catches a migration id added without bumping the constant.
- name: test
working-directory: crates
run: |
cargo nextest run -p vector-core --profile ci
cargo test -p vector-core --doc
# The vault's attack demos are #[ignore]d to run by name with --nocapture, and they are
# hermetic. Never every ignored test: #[ignore] also marks the live-relay ones, which need a
# real network and must not gate a push.
- name: vault attack demos
working-directory: crates
run: cargo nextest run -p vector-core --lib --profile ci --run-ignored only -E 'test(/^crypto::guarded_key::attack::/)'
src-tauri:
name: src-tauri
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
save-if: ${{ github.ref == 'refs/heads/master' }}
# Tauri needs WebKitGTK to build at all on Linux. Vulkan is deliberately
# absent: `--no-default-features` drops `whisper`, whose build wants
# glslc, and transcription is an isolated module — skipping it keeps this
# job minutes shorter while still compiling every command and the
# at-rest encryption sweep.
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev
- uses: actions/setup-node@v5
with:
node-version: 20
cache: npm
# `generate_context!` reads frontendDist at COMPILE time, so the crate
# won't build without dist/ — which is gitignored, and present on every
# dev machine. Copy mode: minification buys a test binary nothing.
- name: build frontend
run: |
npm ci
node scripts/build-frontend.mjs --copy
- name: test
working-directory: src-tauri
run: cargo test --no-default-features --lib