|
1 | 1 | name: CI |
2 | 2 |
|
3 | 3 | on: |
| 4 | + pull_request: |
4 | 5 | push: |
5 | 6 | branches: |
6 | 7 | - main |
7 | | - pull_request: |
8 | | - |
9 | | -permissions: |
10 | | - contents: read |
11 | 8 |
|
12 | 9 | concurrency: |
13 | | - group: ci-${{ github.workflow }}-${{ github.ref }} |
| 10 | + group: ci-${{ github.event_name }}-${{ github.ref }} |
14 | 11 | cancel-in-progress: true |
15 | 12 |
|
16 | 13 | jobs: |
17 | | - version-consistency: |
18 | | - name: Version Consistency |
19 | | - runs-on: ubuntu-22.04 |
20 | | - steps: |
21 | | - - uses: actions/checkout@v4 |
22 | | - - uses: pnpm/action-setup@v4 |
23 | | - - uses: actions/setup-node@v4 |
24 | | - with: |
25 | | - node-version: 22 |
26 | | - cache: pnpm |
27 | | - - run: pnpm install --no-frozen-lockfile |
28 | | - - run: pnpm version:check |
| 14 | + verify: |
| 15 | + name: Lint, test, and build |
| 16 | + runs-on: ubuntu-latest |
| 17 | + permissions: |
| 18 | + contents: read |
29 | 19 |
|
30 | | - cli-cross-platform: |
31 | | - name: CLI Unit (${{ matrix.os }}) |
32 | | - runs-on: ${{ matrix.os }} |
33 | | - needs: version-consistency |
34 | | - strategy: |
35 | | - fail-fast: false |
36 | | - matrix: |
37 | | - os: |
38 | | - - ubuntu-22.04 |
39 | | - - macos-latest |
40 | | - - windows-latest |
41 | 20 | steps: |
42 | | - - uses: actions/checkout@v4 |
43 | | - - uses: pnpm/action-setup@v4 |
44 | | - - uses: actions/setup-node@v4 |
45 | | - with: |
46 | | - node-version: 22 |
47 | | - cache: pnpm |
48 | | - - run: pnpm install --no-frozen-lockfile |
49 | | - - run: pnpm test:cli |
| 21 | + - name: Checkout repository |
| 22 | + uses: actions/checkout@v4 |
50 | 23 |
|
51 | | - transport-windows-smoke: |
52 | | - name: Transport Windows Smoke |
53 | | - runs-on: windows-2022 |
54 | | - needs: version-consistency |
55 | | - steps: |
56 | | - - uses: actions/checkout@v4 |
57 | | - - uses: dtolnay/rust-toolchain@stable |
58 | | - - name: Install Windows GNU target |
59 | | - run: rustup target add x86_64-pc-windows-gnu |
60 | | - - uses: Swatinem/rust-cache@v2 |
| 24 | + - name: Setup pnpm |
| 25 | + uses: pnpm/action-setup@v4 |
61 | 26 | with: |
62 | | - workspaces: apps/server -> .build/server/target |
63 | | - - uses: pnpm/action-setup@v4 |
64 | | - - uses: actions/setup-node@v4 |
65 | | - with: |
66 | | - node-version: 22 |
67 | | - cache: pnpm |
68 | | - - run: pnpm install --no-frozen-lockfile |
69 | | - - run: npx playwright install chromium |
70 | | - # Pin this smoke to windows-2022 because windows-latest currently tracks |
71 | | - # windows-2025 and GitHub-hosted windows-2025 does not reliably provide WSL. |
72 | | - - run: pnpm test:smoke:windows:transport -- --skip-wsl-preflight |
| 27 | + version: 10.33.2 |
| 28 | + run_install: false |
73 | 29 |
|
74 | | - verify-linux: |
75 | | - name: Verify Linux Runtime |
76 | | - runs-on: ubuntu-22.04 |
77 | | - needs: version-consistency |
78 | | - env: |
79 | | - CODER_STUDIO_START_TIMEOUT_MS: 45000 |
80 | | - CODER_STUDIO_RUST_TARGET: x86_64-unknown-linux-musl |
81 | | - steps: |
82 | | - - uses: actions/checkout@v4 |
83 | | - - name: Install Linux build dependencies |
84 | | - run: | |
85 | | - sudo apt-get update |
86 | | - sudo apt-get install -y \ |
87 | | - build-essential \ |
88 | | - curl \ |
89 | | - file \ |
90 | | - musl-tools \ |
91 | | - xvfb \ |
92 | | - wget |
93 | | - - uses: dtolnay/rust-toolchain@stable |
| 30 | + - name: Setup Node.js |
| 31 | + uses: actions/setup-node@v4 |
94 | 32 | with: |
95 | | - components: rustfmt, clippy |
96 | | - - name: Install Linux musl target |
97 | | - run: rustup target add x86_64-unknown-linux-musl |
98 | | - - uses: Swatinem/rust-cache@v2 |
99 | | - with: |
100 | | - workspaces: apps/server -> .build/server/target |
101 | | - - uses: pnpm/action-setup@v4 |
102 | | - - uses: actions/setup-node@v4 |
103 | | - with: |
104 | | - node-version: 22 |
105 | | - cache: pnpm |
106 | | - - run: pnpm install --no-frozen-lockfile |
107 | | - - run: pnpm test:cli |
108 | | - - run: cargo fmt --manifest-path apps/server/Cargo.toml --all --check |
109 | | - - run: cargo clippy --manifest-path apps/server/Cargo.toml --all-targets -- -D warnings |
110 | | - - run: cargo check --manifest-path apps/server/Cargo.toml |
111 | | - - run: cargo test --manifest-path apps/server/Cargo.toml |
112 | | - - run: pnpm pack:local |
113 | | - - run: xvfb-run -a pnpm test:smoke |
114 | | - - run: npx playwright install --with-deps chromium |
115 | | - - run: xvfb-run -a pnpm test:e2e:release |
116 | | - - uses: actions/upload-artifact@v4 |
117 | | - if: success() |
118 | | - with: |
119 | | - name: release-artifacts-linux |
120 | | - path: .artifacts/* |
| 33 | + node-version: "24" |
| 34 | + cache: "pnpm" |
| 35 | + |
| 36 | + - name: Install dependencies |
| 37 | + run: pnpm install --frozen-lockfile |
| 38 | + |
| 39 | + - name: Validate changesets metadata |
| 40 | + run: pnpm changeset:validate |
| 41 | + |
| 42 | + - name: Run lint |
| 43 | + run: pnpm ci:lint |
| 44 | + |
| 45 | + - name: Run tests |
| 46 | + run: pnpm ci:test |
| 47 | + |
| 48 | + - name: Run production build |
| 49 | + run: pnpm ci:build |
0 commit comments