Skip to content

Commit 432ec75

Browse files
committed
Fix compilation issues, restructure examples, and add CI/CD
- Fix all doctest compilation errors (11 failures -> 0) - Correct import paths in OAuth module doctests - Fix TokenRotator parameter mismatch - Fix OpenIDConnect type error - Restructure examples as standalone Cargo projects - Convert .txt files to proper Rust projects with Cargo.toml - Each example is now an independent binary crate - Make README concise and focused (343 -> 139 lines) - Add GitHub Actions CI/CD workflow - Lint job with clippy and rustfmt - Compilation check - Tests with default and all features - Remove CLAUDE.md planning document - All tests passing (50 passed) - Zero clippy warnings
1 parent 63ce8d7 commit 432ec75

File tree

23 files changed

+284
-2346
lines changed

23 files changed

+284
-2346
lines changed

.github/workflows/ci.yaml

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
tags-ignore:
8+
- '*'
9+
pull_request:
10+
branches:
11+
- '*'
12+
13+
env:
14+
CARGO_TERM_COLOR: always
15+
RUST_BACKTRACE: 1
16+
17+
jobs:
18+
lint:
19+
name: Lint
20+
runs-on: ubuntu-latest
21+
container:
22+
image: rust:latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Rust
28+
run: |
29+
rustup component add clippy rustfmt
30+
31+
- name: Cache cargo registry
32+
uses: actions/cache@v4
33+
with:
34+
path: ~/.cargo/registry
35+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-cargo-registry-
38+
39+
- name: Cache cargo index
40+
uses: actions/cache@v4
41+
with:
42+
path: ~/.cargo/git
43+
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
44+
restore-keys: |
45+
${{ runner.os }}-cargo-git-
46+
47+
- name: Cache cargo build
48+
uses: actions/cache@v4
49+
with:
50+
path: target
51+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
52+
restore-keys: |
53+
${{ runner.os }}-cargo-build-target-
54+
55+
- name: Run clippy
56+
run: cargo clippy --all-features -- -D warnings
57+
58+
- name: Check formatting
59+
run: cargo fmt --check
60+
61+
check:
62+
name: Check
63+
runs-on: ubuntu-latest
64+
container:
65+
image: rust:latest
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v4
69+
70+
- name: Cache cargo registry
71+
uses: actions/cache@v4
72+
with:
73+
path: ~/.cargo/registry
74+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
75+
restore-keys: |
76+
${{ runner.os }}-cargo-registry-
77+
78+
- name: Cache cargo index
79+
uses: actions/cache@v4
80+
with:
81+
path: ~/.cargo/git
82+
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
83+
restore-keys: |
84+
${{ runner.os }}-cargo-git-
85+
86+
- name: Cache cargo build
87+
uses: actions/cache@v4
88+
with:
89+
path: target
90+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
91+
restore-keys: |
92+
${{ runner.os }}-cargo-build-target-
93+
94+
- name: Check compilation
95+
run: cargo check --all
96+
97+
test-default:
98+
name: Test (Default Features)
99+
runs-on: ubuntu-latest
100+
container:
101+
image: rust:latest
102+
steps:
103+
- name: Checkout
104+
uses: actions/checkout@v4
105+
106+
- name: Cache cargo registry
107+
uses: actions/cache@v4
108+
with:
109+
path: ~/.cargo/registry
110+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
111+
restore-keys: |
112+
${{ runner.os }}-cargo-registry-
113+
114+
- name: Cache cargo index
115+
uses: actions/cache@v4
116+
with:
117+
path: ~/.cargo/git
118+
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
119+
restore-keys: |
120+
${{ runner.os }}-cargo-git-
121+
122+
- name: Cache cargo build
123+
uses: actions/cache@v4
124+
with:
125+
path: target
126+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
127+
restore-keys: |
128+
${{ runner.os }}-cargo-build-target-
129+
130+
- name: Run tests
131+
run: cargo test
132+
133+
test-all:
134+
name: Test (All Features)
135+
runs-on: ubuntu-latest
136+
container:
137+
image: rust:latest
138+
steps:
139+
- name: Checkout
140+
uses: actions/checkout@v4
141+
142+
- name: Cache cargo registry
143+
uses: actions/cache@v4
144+
with:
145+
path: ~/.cargo/registry
146+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
147+
restore-keys: |
148+
${{ runner.os }}-cargo-registry-
149+
150+
- name: Cache cargo index
151+
uses: actions/cache@v4
152+
with:
153+
path: ~/.cargo/git
154+
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
155+
restore-keys: |
156+
${{ runner.os }}-cargo-git-
157+
158+
- name: Cache cargo build
159+
uses: actions/cache@v4
160+
with:
161+
path: target
162+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
163+
restore-keys: |
164+
${{ runner.os }}-cargo-build-target-
165+
166+
- name: Run tests with all features
167+
run: cargo test --all-features --workspace

0 commit comments

Comments
 (0)