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
name: "Test Suite"
on:
push:
pull_request:
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
override: true
toolchain: nightly
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast
# coverage:
# name: code coverage
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# # the action needs a nightly toolchain with llvm-tools
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# components: llvm-tools-preview
# - name: Run tests
# run: cargo test --verbose
# env:
# CARGO_INCREMENTAL: '0'
# RUSTFLAGS: '-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
# RUSTDOCFLAGS: '-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
# - name: rust-grcov
# # You may pin to the exact commit or the version.
# # uses: actions-rs/grcov@bb47b1ed7883a1502fa6875d562727ace2511248
# uses: actions-rs/grcov@v0.1
# - name: Codecov
# # You may pin to the exact commit or the version.
# # uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378
# uses: codecov/codecov-action@v4
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# with:
# # Repository upload token - get it from codecov.io. Required only for private repositories
# # token: # optional
# # Specify whether the Codecov output should be verbose
# verbose: true
# fail_ci_if_error: true
# Check formatting with rustfmt
formatting:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Ensure rustfmt is installed and setup problem matcher
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1