-
Notifications
You must be signed in to change notification settings - Fork 1
120 lines (113 loc) · 3.48 KB
/
ci.yml
File metadata and controls
120 lines (113 loc) · 3.48 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
name: CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
version-consistency:
name: Version Consistency
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --no-frozen-lockfile
- run: pnpm version:check
cli-cross-platform:
name: CLI Unit (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: version-consistency
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --no-frozen-lockfile
- run: pnpm test:cli
transport-windows-smoke:
name: Transport Windows Smoke
runs-on: windows-2022
needs: version-consistency
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install Windows GNU target
run: rustup target add x86_64-pc-windows-gnu
- uses: Swatinem/rust-cache@v2
with:
workspaces: apps/server -> .build/server/target
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --no-frozen-lockfile
- run: npx playwright install chromium
# Pin this smoke to windows-2022 because windows-latest currently tracks
# windows-2025 and GitHub-hosted windows-2025 does not reliably provide WSL.
- run: pnpm test:smoke:windows:transport -- --skip-wsl-preflight
verify-linux:
name: Verify Linux Runtime
runs-on: ubuntu-22.04
needs: version-consistency
env:
CODER_STUDIO_START_TIMEOUT_MS: 45000
CODER_STUDIO_RUST_TARGET: x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- name: Install Linux build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
curl \
file \
musl-tools \
xvfb \
wget
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install Linux musl target
run: rustup target add x86_64-unknown-linux-musl
- uses: Swatinem/rust-cache@v2
with:
workspaces: apps/server -> .build/server/target
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --no-frozen-lockfile
- run: pnpm test:cli
- run: cargo fmt --manifest-path apps/server/Cargo.toml --all --check
- run: cargo clippy --manifest-path apps/server/Cargo.toml --all-targets -- -D warnings
- run: cargo check --manifest-path apps/server/Cargo.toml
- run: cargo test --manifest-path apps/server/Cargo.toml
- run: pnpm pack:local
- run: xvfb-run -a pnpm test:smoke
- run: npx playwright install --with-deps chromium
- run: xvfb-run -a pnpm test:e2e:release
- uses: actions/upload-artifact@v4
if: success()
with:
name: release-artifacts-linux
path: .artifacts/*