fix examples & add ci for running examples #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check and Test | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
cargo-check-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Format | |
run: cargo fmt --check | |
- name: Build | |
run: cargo build --all-targets --all-features | |
- name: Clippy | |
run: cargo clippy --all-targets --all-features | |
- name: Run tests | |
run: cargo test | |
- name: Run examples | |
run: | | |
for example in $(ls examples/ | sed 's/\.rs$//'); do | |
cargo run --example $example | |
done | |
semver: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cargo-bins/cargo-binstall@main | |
- name: Install cargo-semver-checks | |
run: cargo binstall -y cargo-semver-checks | |
- name: Check | |
run: cargo semver-checks check-release -p await-tree |