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
name: CI
on:
pull_request:
push:
branches:
- main
tags:
- "v*.*.*"
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
stable:
name: Stable
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt,clippy
- name: Restore Rust cache
uses: Swatinem/rust-cache@v2
- name: Validate Twitch surface tooling
run: python3 -m py_compile tools/twitch_surface.py
- name: Check formatting
run: cargo fmt --all --check
- name: Lint
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
- name: Test default features
run: cargo test --workspace --locked
- name: Test all features
run: cargo test --workspace --all-features --locked
- name: Build docs
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --workspace --no-deps --all-features --locked
- name: Verify packaging
run: cargo package --workspace --locked
wasm:
name: Stable (wasm)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install stable toolchain with wasm target
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Restore Rust cache
uses: Swatinem/rust-cache@v2
- name: Build Cloudflare Worker feature for wasm
run: cargo build --features cloudflare-worker --target wasm32-unknown-unknown --locked
msrv:
name: MSRV 1.85.0
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@1.85.0
- name: Restore Rust cache
uses: Swatinem/rust-cache@v2
- name: Test all features on MSRV
run: cargo test --workspace --all-features --locked
reuse:
name: REUSE
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Check REUSE compliance
uses: fsfe/reuse-action@v6