-
Notifications
You must be signed in to change notification settings - Fork 336
61 lines (52 loc) · 1.46 KB
/
ci.yml
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
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
name: CI
env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
jobs:
doc-test:
name: Test code blocks in markdown
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.81 # because 1.82 broke tests with main functions in them
- name: Build dependencies
run: RUSTFLAGS="--cfg tokio_unstable" cargo build
working-directory: doc-test
continue-on-error: true
- name: Actually run the tests
run: RUSTFLAGS="--cfg tokio_unstable" cargo test
working-directory: doc-test
tutorial-code:
name: Test tutorial-code directory
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Build dependencies
run: cargo build --all
working-directory: tutorial-code
continue-on-error: true
- name: Actually run the tests
run: cargo test --all
working-directory: tutorial-code
fmt-check:
name: Verify project code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install node dependencies
run: npm install
- name: Check formatting
run: npm run fmt:check