Skip to content

Commit 7ce00f0

Browse files
committed
ci: add GitHub Actions workflows and Dependabot config
- CI workflow with test, fmt, clippy, docs, and MSRV checks - Test on Linux, macOS, and Windows - Test with stable and beta Rust - Dependabot for automated dependency updates - Funding configuration placeholder
1 parent 47d2728 commit 7ce00f0

3 files changed

Lines changed: 128 additions & 0 deletions

File tree

.github/FUNDING.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# GitHub sponsors (optional)
2+
# github: [your-username]
3+
4+
# Other funding options
5+
# patreon: your-username
6+
# ko_fi: your-username
7+
# custom: ["https://your-donation-link.com"]

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 10
8+
reviewers:
9+
- "crumplecup"
10+
labels:
11+
- "dependencies"

.github/workflows/ci.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
pull_request:
7+
branches: [ master, main ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUSTFLAGS: -D warnings
12+
13+
jobs:
14+
test:
15+
name: Test
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest, windows-latest]
20+
rust: [stable, beta]
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Install Rust
25+
uses: dtolnay/rust-toolchain@master
26+
with:
27+
toolchain: ${{ matrix.rust }}
28+
29+
- name: Cache cargo registry
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/.cargo/registry
33+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
34+
35+
- name: Cache cargo index
36+
uses: actions/cache@v4
37+
with:
38+
path: ~/.cargo/git
39+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
40+
41+
- name: Cache cargo build
42+
uses: actions/cache@v4
43+
with:
44+
path: target
45+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
46+
47+
- name: Build
48+
run: cargo build --verbose
49+
50+
- name: Run tests
51+
run: cargo test --verbose
52+
53+
- name: Run tests (all features)
54+
run: cargo test --all-features --verbose
55+
56+
fmt:
57+
name: Formatting
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v4
61+
62+
- name: Install Rust
63+
uses: dtolnay/rust-toolchain@stable
64+
with:
65+
components: rustfmt
66+
67+
- name: Check formatting
68+
run: cargo fmt --all -- --check
69+
70+
clippy:
71+
name: Clippy
72+
runs-on: ubuntu-latest
73+
steps:
74+
- uses: actions/checkout@v4
75+
76+
- name: Install Rust
77+
uses: dtolnay/rust-toolchain@stable
78+
with:
79+
components: clippy
80+
81+
- name: Run clippy
82+
run: cargo clippy --all-targets --all-features -- -D warnings
83+
84+
docs:
85+
name: Documentation
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v4
89+
90+
- name: Install Rust
91+
uses: dtolnay/rust-toolchain@stable
92+
93+
- name: Build documentation
94+
run: cargo doc --no-deps --all-features
95+
env:
96+
RUSTDOCFLAGS: -D warnings
97+
98+
msrv:
99+
name: MSRV (1.75)
100+
runs-on: ubuntu-latest
101+
steps:
102+
- uses: actions/checkout@v4
103+
104+
- name: Install Rust 1.75
105+
uses: dtolnay/rust-toolchain@master
106+
with:
107+
toolchain: "1.75"
108+
109+
- name: Build with MSRV
110+
run: cargo build --verbose

0 commit comments

Comments
 (0)