-
Notifications
You must be signed in to change notification settings - Fork 0
174 lines (162 loc) · 5.74 KB
/
Copy pathci.yml
File metadata and controls
174 lines (162 loc) · 5.74 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: ci
on:
push:
branches: [main]
pull_request:
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CI: true
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0
with:
# Keep in lockstep with the vite-plus catalog pin (renovate-managed).
# renovate: datasource=npm depName=vite-plus
version: "0.2.4"
cache: true
node-version-file: package.json
run-install: true
sfw: true
- run: vp run check
- run: vp run lint:impeccable
- run: vp run test
- run: vp run manypkg
- run: vp dedupe --check -- --prefer-offline
- run: vp run typesync:check
- run: vp run lint:knip
- run: vp run lint:knip:prod
build:
runs-on: ubuntu-latest
env:
DATABASE_URL: "file:/tmp/build.db"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0
with:
# Keep in lockstep with the vite-plus catalog pin (renovate-managed).
# renovate: datasource=npm depName=vite-plus
version: "0.2.4"
cache: true
node-version-file: package.json
run-install: true
sfw: true
- name: Write app env
run: |
echo "DATABASE_URL=$DATABASE_URL" > apps/collegemap/.env
echo "DATABASE_URL=$DATABASE_URL" > apps/grove/.env
- run: vp run build
manager-rust:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/manager
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install tmux
run: sudo apt-get update -q && sudo apt-get install -y -q tmux && tmux -V
- name: Install pinned toolchain (rust-toolchain.toml)
run: rustup toolchain install && rustup component add rustfmt clippy
- run: cargo fmt --check
- run: cargo clippy --all-targets --locked -- -D warnings
- run: cargo test --locked
- name: tmux integration tests (scratch sockets only)
run: N12_TMUX_IT=1 cargo test --locked --test tmux_it -- --ignored
courier-rust:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/courier
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install system build dependencies
run: sudo apt-get update -q && sudo apt-get install -y -q libsqlite3-dev pkg-config libssl-dev
- name: Install pinned toolchain (rust-toolchain.toml)
run: rustup toolchain install && rustup component add rustfmt clippy
- run: cargo fmt --all --check
- run: cargo clippy --workspace --all-targets --locked -- -W clippy::pedantic -D warnings
- run: cargo build --workspace --all-targets --locked
- run: cargo test --workspace --locked
dispatcher-rust:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/dispatcher
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install pinned toolchain (rust-toolchain.toml)
run: rustup toolchain install && rustup component add rustfmt clippy
- run: cargo fmt --check
- run: cargo clippy --all-targets --locked -- -D warnings
- run: cargo test --locked
control-plane-rust:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/control-plane
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install pinned toolchain (rust-toolchain.toml)
run: rustup toolchain install && rustup component add rustfmt clippy
- run: cargo fmt --check
- run: cargo clippy --all-targets --locked -- -D warnings
- run: cargo test --locked
box-agent-rust:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/box-agent
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install pinned toolchain (rust-toolchain.toml)
run: rustup toolchain install && rustup component add rustfmt clippy
- run: cargo fmt --check
- run: cargo clippy --all-targets --locked -- -D warnings
- run: cargo test --locked
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: crate-ci/typos@bee27e3a4fd1ea2111cf90ab89cd076c870fce14 # v1.48.0
link-check:
timeout-minutes: 2
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
with:
args: --cache --max-cache-age 1d .
token: ${{ github.token }}