-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (40 loc) · 1.51 KB
/
rust.yml
File metadata and controls
48 lines (40 loc) · 1.51 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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up cargo sort
run: cargo install cargo-sort --locked --version 2.0.1
- name: Check Cargo.toml sorted
run: cargo sort --workspace --check
- name: Set up nightly cargo fmt
run: rustup toolchain install nightly-2025-11-18 --component rustfmt
# nightly のバージョンを変更する際は hooq-macros/tests/special/flavor_not_cargo_project/build_script.rs の TOOLCHAIN も合わせて変更すること
- name: Check format
run: cargo +nightly-2025-11-18 fmt --all -- --check
- name: Check clippy
run: cargo clippy --all-targets --workspace -- -D warnings
- name: Set up cargo expand
run: cargo install cargo-expand --locked --version 1.0.114
- name: Run tests
run: cargo test --workspace --no-fail-fast --verbose
build_and_analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Build
run: cargo +nightly-2025-11-18 build -Z unstable-options --verbose --timings=html
- name: Save cargo-timings
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: cargo-timing
path: target/cargo-timings/cargo-timing.html
if-no-files-found: warn