Repository navigation
106 lines (81 loc) · 2.53 KB
/
Copy pathci.yml
File metadata and controls
106 lines (81 loc) · 2.53 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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
test:
name: Rust workspace
# The Linux release image (see release-binaries.yml). Playwright has no
# Chromium for ubuntu-latest, which is Ubuntu 26.04 since October 2026.
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install Node test dependencies
run: |
npm ci --ignore-scripts
npx playwright install chromium
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --locked --workspace --all-targets -- -D warnings
- name: Test
run: cargo test --locked --workspace --no-fail-fast
- name: Build CLI
run: cargo build --locked --release -p phonton-cli
macos:
name: macOS (local runtime and CLI)
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --locked -p phonton-local -p phonton-cli --all-targets -- -D warnings
- name: Test local runtime
run: cargo test --locked -p phonton-local --no-fail-fast
windows:
name: Windows (workspace)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install Node test dependencies
run: |
npm ci --ignore-scripts
npx playwright install chromium
- name: Clippy
run: cargo clippy --locked --workspace --all-targets -- -D warnings
# Includes the symlinked rustup-proxy case (cargo.exe -> rustup.exe, as
# scoop installs it); with CI set, that test fails instead of skipping.
- name: Test
run: cargo test --locked --workspace --no-fail-fast