-
Notifications
You must be signed in to change notification settings - Fork 0
124 lines (96 loc) · 2.99 KB
/
Copy pathci.yml
File metadata and controls
124 lines (96 loc) · 2.99 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
name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Go, Rust, JavaScript, Puppeteer, and build checks
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
cache-dependency-path: package-lock.json
- name: Print toolchain versions
run: |
go version
rustc --version
cargo --version
node --version
npm --version
- name: Install wasm-bindgen CLI
run: cargo install wasm-bindgen-cli --version 0.2.122 --locked
- name: Install Node dependencies
run: npm ci
- name: Run Rust rewriter tests
run: cargo test --manifest-path rewriter-rs/Cargo.toml
- name: Run Go tests
run: go test ./...
- name: Run Go js/wasm tests
run: npm run test:wasm
- name: Run JavaScript and Puppeteer tests
run: npm test
- name: Build deployable artifacts
run: npm run build
lint:
name: Lint (Go, Rust, JavaScript)
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
components: clippy, rustfmt
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
cache-dependency-path: package-lock.json
- name: Install golangci-lint v2.12.2
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v2.12.2/install.sh \
| sh -s -- -b "$(go env GOPATH)/bin" v2.12.2
golangci-lint version
- name: Verify golangci-lint config
run: golangci-lint config verify
- name: Run golangci-lint (native)
run: golangci-lint run --timeout=5m
- name: Run golangci-lint (js/wasm)
run: GOOS=js GOARCH=wasm golangci-lint run --timeout=5m
- name: Check Rust formatting
run: cargo fmt --manifest-path rewriter-rs/Cargo.toml --all --check
- name: Run clippy
run: cargo clippy --manifest-path rewriter-rs/Cargo.toml --all-targets -- -D warnings
- name: Install Node dependencies
run: npm ci
- name: Run Biome
run: npx biome ci web scripts test