Skip to content

Commit

Permalink
verify README.md example on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed Nov 23, 2023
1 parent cae84aa commit 375a308
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,16 @@ jobs:
run: cargo clippy
- name: Test
run: cargo test

example:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Test README.md example
run: |
sed -n '/```rust/,/```/{//!p;}' README.md > src/main.rs
sed -i '/^\[dependencies\]$/arand = "0"' Cargo.toml
cargo run

0 comments on commit 375a308

Please sign in to comment.