Repository navigation
128 lines (106 loc) · 3.44 KB
/
Copy pathci.yml
File metadata and controls
128 lines (106 loc) · 3.44 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
126
127
128
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.ref_name) || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
CI: true
jobs:
check:
name: Test and lint
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: frontend/.nvmrc
- name: Install UI dependencies
working-directory: frontend
run: |
npm install --global pnpm@11.25.0
pnpm install --frozen-lockfile
- name: Install Linux desktop dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends \
libwebkit2gtk-4.1-dev \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Set up Rust build cache
uses: ./.github/actions/rust-build-cache
with:
cache-key: ci
save: ${{ github.ref == 'refs/heads/main' }}
- name: Install nextest
uses: taiki-e/install-action@e407f7bafb71fd004bc5c2da3032e5470cbb6ef0 # v2
with:
tool: nextest
# Build once before Cargo, which embeds the frontend assets.
- name: Build UI
working-directory: frontend
run: pnpm build
- name: Test Rust
run: cargo nextest run --workspace
- name: Lint Rust
run: make lint
- name: Lint UI and test packaging
working-directory: frontend
run: pnpm check:lint
- name: Test UI in Chrome
working-directory: frontend
env:
PLAYWRIGHT_CHANNEL: chrome
run: |
google-chrome --version
pnpm test:storybook
- name: Check generated schemas
run: |
make generate-schema
git diff --exit-code -- schema
windows:
name: Windows agent tests
runs-on: windows-2025
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@7e38f4b43b4db5c8dd498af069a4f6196df1d067 # master
with:
toolchain: "1.98"
- name: Restore Rust cache
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
shared-key: ci-windows
cache-workspace-crates: true
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install nextest
uses: taiki-e/install-action@e407f7bafb71fd004bc5c2da3032e5470cbb6ef0 # v2
with:
tool: nextest
- name: Test agent
run: cargo nextest run --locked --package agentdesktop-agent --lib
container:
name: Container
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Build controller image
run: make docker BUILD_PROFILE=debug