File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ pull_request :
5+ branches : [master]
6+
7+ concurrency :
8+ group : ${{ github.workflow }}-${{ github.ref }}
9+ cancel-in-progress : true
10+
11+ jobs :
12+ check :
13+ name : Check & Test
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Install Rust
20+ uses : dtolnay/rust-toolchain@stable
21+ with :
22+ components : clippy
23+ - name : Cache cargo registry
24+ uses : actions/cache@v4
25+ with :
26+ path : |
27+ ~/.cargo/registry/index/
28+ ~/.cargo/registry/cache/
29+ ~/.cargo/git/db/
30+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
31+
32+ - uses : Swatinem/rust-cache@v2
33+ - name : Check formatting
34+ run : cargo fmt --check
35+
36+ - name : Clippy
37+ run : cargo clippy -- -D warnings
38+
39+ - name : Run tests
40+ run : cargo test --all-features
Original file line number Diff line number Diff line change 1+ name : Publish to crates.io
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ plan :
7+ required : true
8+ type : string
9+
10+ jobs :
11+ publish-crates :
12+ runs-on : ubuntu-22.04
13+ steps :
14+ - uses : actions/checkout@v4
15+ with :
16+ persist-credentials : false
17+ submodules : recursive
18+ - name : Install Rust
19+ uses : dtolnay/rust-toolchain@stable
20+ with :
21+ toolchain : stable
22+ - name : Publish to crates.io
23+ run : cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments