-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (60 loc) · 2.3 KB
/
Copy pathci.yml
File metadata and controls
72 lines (60 loc) · 2.3 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
name: CI
# Feedback for pull requests and for every push to the mainline. The
# build-and-test job is the one that matters: it is the same set of checks the
# deploy workflow gates on, so a green tick here means the same commit can ship.
# Lint runs alongside but is advisory (see the job) because the tree carries a
# large backlog of pre-existing findings that a feature branch should not have
# to clear before it can merge.
on:
push:
branches: ["master", "main"]
pull_request:
branches: ["master", "main"]
# A newer push to the same branch makes an in-flight run obsolete.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
# Node 20, not 18: vitest 4 requires ^20 || ^22 || >=24, so the test
# step below will not even start on the old pin.
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build (all workspaces)
# This is also the typecheck that counts - tsup and vite fail the build
# on a real type error in shared, server or web.
run: npm run build
- name: Test (server - unit + e2e)
# No `sui` binary is installed on the runner on purpose: a present-but-
# unconfigured CLI blocks on an interactive prompt, while an absent one
# fails fast. The e2e suite is written to assert only the shape of the
# "sui missing" state, so it is deterministic here.
run: npm test -w sui-cli-web-server
lint:
runs-on: ubuntu-latest
# Advisory only: the tree has a standing biome backlog, so a red result here
# must not wall off a branch. It stays in the pipeline so new violations are
# visible in the log rather than invisible.
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Lint and format check
run: npx @biomejs/biome ci .
continue-on-error: true