Skip to content

ci: Run examples in test workflow #2

ci: Run examples in test workflow

ci: Run examples in test workflow #2

Workflow file for this run

name: Test
on:
push:
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# - run: |
# rustup update
# rustup default
- name: Check
run: |
cargo check --verbose
- name: Compile
run: |
cargo build --verbose
- name: Lint
run: |
cargo clippy
- name: Test
run: |
cargo test --verbose
- name: Examples
run: |
examples=$(
cargo metadata --no-deps --format-version 1 |
jq '.packages[1].targets.[] | select(.kind | contains(["example"])) | .name' -r
)
for ex in $examples; do
cargo run --example $ex
done