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
name: Rust
on:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
steps:
- uses: actions/checkout@v2
# Installs the latest stable rust, and all components needed for the rest of the CI pipeline.
- name: Set up CI environment
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
# Makes sure the code builds successfully.
- name: Build
run: cargo build --verbose
# Makes sure all of the tests pass.
- name: Test
run: cargo test --verbose
# Runs Clippy on the codebase, and makes sure there are no lint warnings.
# Disabled for now. Re-enable if you find it useful enough to deal with it constantly breaking.
# - name: Clippy
# run: cargo clippy --all-targets --all-features -- -D warnings -A clippy::unreadable_literal -A clippy::needless_range_loop -A clippy::float_cmp -A clippy::comparison-chain -A clippy::needless-doctest-main -A clippy::missing-safety-doc
# Makes sure the codebase is up to `cargo fmt` standards
- name: Format check
run: cargo fmt --all -- --check