-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (37 loc) · 1.14 KB
/
ci.yml
File metadata and controls
43 lines (37 loc) · 1.14 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
name: CI
on: [push, pull_request]
jobs:
# Ensure code is properly formatted
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable --no-self-update --profile minimal --component rustfmt
- name: Check library formatting
run: cargo fmt --check --all
# Lint the library
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable --no-self-update --profile minimal --component clippy
- name: Lint the library
run: cargo clippy -- -D warnings
# Run tests
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable --no-self-update --profile minimal
- name: Run unit and documentation tests
run: cargo test
# Make sure documentation builds, and doclinks are valid
doc:
env:
RUSTDOCFLAGS: -D warnings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable --no-self-update --profile minimal
- name: Check documentation and doclinks
run: cargo rustdoc