-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (104 loc) · 3.26 KB
/
basic.yaml
File metadata and controls
112 lines (104 loc) · 3.26 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
name: Basic Checks
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
env:
RUSTFLAGS: -Dwarnings
jobs:
test:
name: Rust ${{matrix.rust}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [beta, stable, 1.94.1]
# include:
# - rust: nightly
# rustflags: --cfg thiserror_nightly_testing
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{matrix.rust}}
components: rust-src
- uses: Swatinem/rust-cache@v2
- run: cargo test --all
env:
RUSTFLAGS: ${{matrix.rustflags}} ${{env.RUSTFLAGS}}
clippy:
name: Clippy
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v6
# - name: Check semver
# uses: obi1kenobi/cargo-semver-checks-action@v2
- name: Read toolchain from rust-toolchain.toml
id: toolchain
run: |
version=$(grep '^channel' rust-toolchain.toml | tr -d ' "' | cut -d= -f2)
echo "version=$version" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ steps.toolchain.outputs.version }}
components: clippy, rust-src
- uses: Swatinem/rust-cache@v2
- run: cargo clippy -- -Dclippy::all -Dclippy::pedantic
fmt:
name: Fmt
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- name: Read toolchain from rust-toolchain.toml
id: toolchain
run: |
version=$(grep '^channel' rust-toolchain.toml | tr -d ' "' | cut -d= -f2)
echo "version=$version" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ steps.toolchain.outputs.version }}
components: rustfmt, rust-src
- run: cargo fmt --all -- --check
doc:
name: Doc
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: rust-src
- uses: Swatinem/rust-cache@v2
- run: cargo doc --no-deps
env:
RUSTDOCFLAGS: -Dwarnings
no-default-features:
name: No-default-features
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- name: Read toolchain from rust-toolchain.toml
id: toolchain
run: |
version=$(grep '^channel' rust-toolchain.toml | tr -d ' "' | cut -d= -f2)
echo "version=$version" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ steps.toolchain.outputs.version }}
components: rust-src
- uses: Swatinem/rust-cache@v2
- run: cargo check --no-default-features --lib --tests
- run: cargo check --no-default-features --features hand-histories --lib --tests
- run: cargo check --no-default-features --features bot-profiles --lib --tests
- run: cargo check --no-default-features --features player-stats --lib --tests
- run: cargo check --no-default-features --features player-stats-persistence --lib --tests