Skip to content

Commit 693637c

Browse files
committed
add CI
1 parent 27d0c49 commit 693637c

File tree

5 files changed

+127
-0
lines changed

5 files changed

+127
-0
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: Keruspe
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and test
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: "0 12 * * 1"
8+
9+
jobs:
10+
build_and_test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
rust: [nightly, beta, stable, 1.85.0]
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install latest ${{ matrix.rust }}
21+
uses: actions-rs/toolchain@v1
22+
with:
23+
toolchain: ${{ matrix.rust }}
24+
profile: minimal
25+
override: true
26+
27+
- name: Run cargo check
28+
uses: actions-rs/cargo@v1
29+
with:
30+
command: check
31+
args: --all --bins --examples --tests --all-features
32+
33+
- name: Run cargo check (without dev-dependencies to catch missing feature flags)
34+
if: startsWith(matrix.rust, 'nightly')
35+
uses: actions-rs/cargo@v1
36+
with:
37+
command: check
38+
args: -Z features=dev_dep
39+
40+
- name: Run cargo test
41+
uses: actions-rs/cargo@v1
42+
with:
43+
command: test

.github/workflows/lint.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
clippy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions-rs/toolchain@v1
14+
with:
15+
toolchain: stable
16+
profile: minimal
17+
components: clippy
18+
- uses: actions-rs/clippy-check@v1
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
args: --all-features -- -W clippy::all
22+
23+
rustfmt:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- uses: actions-rs/toolchain@v1
29+
with:
30+
toolchain: stable
31+
profile: minimal
32+
components: rustfmt
33+
- uses: actions-rs/cargo@v1
34+
with:
35+
command: fmt
36+
args: --all -- --check
37+
38+
docs:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v2
43+
- name: Install Rust
44+
uses: actions-rs/toolchain@v1
45+
with:
46+
toolchain: stable
47+
profile: minimal
48+
override: true
49+
- name: Check documentation
50+
env:
51+
RUSTDOCFLAGS: -D warnings
52+
uses: actions-rs/cargo@v1
53+
with:
54+
command: doc
55+
args: --no-deps --document-private-items --all-features

.github/workflows/security.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Security audit
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
security_audit:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: rustsec/audit-check@v2
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/semver.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Semver compliance check
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
semver_check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: obi1kenobi/cargo-semver-checks-action@v2
13+

0 commit comments

Comments
 (0)