-
Notifications
You must be signed in to change notification settings - Fork 11
96 lines (81 loc) · 2.25 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
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
name: ci
on:
merge_group:
pull_request:
push:
branches:
- master
defaults:
run:
shell: bash
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: --deny warnings
RUSTFLAGS: --deny warnings
jobs:
rust-test:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, windows, macos]
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: ./scripts/download/cargo-nextest.sh && mv cargo-nextest ~/.cargo/bin
- run: which cargo
- run: echo $OSTYPE
- run: ls -la ~/.cargo/bin
- run: echo ${Path:-nothing}
- run: cargo nextest run --locked
- run: cargo clippy
- run: cargo doc --no-deps
rust-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --check
# This task ensures, required packages can be built with a stable toolchain
# the only package requiring nightly should be `marker_rustc_driver` and
# optionally `marker_adapter`
rust-check-on-stable:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, windows, macos]
steps:
- uses: actions/checkout@v3
- run: rm rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- run: >-
cargo check
--locked
--workspace
--exclude marker_rustc_driver
--exclude marker_lints
# Check the formatting of TOML files in the repository
toml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./scripts/download/taplo.sh
- run: ./taplo fmt --check
# Check for typos in the repository based on a static dictionary
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./scripts/download/typos.sh
- run: ./typos
# Check for unused dependencies that uses simple regex search,
# meaning it's ⚡️ blazingly ⚡️ fast
rust-unused-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./scripts/download/cargo-machete.sh
- run: ./cargo-machete