1
0
Fork 0
mirror of https://github.com/imjasonh/testscript-rs synced 2026-07-09 01:26:40 +00:00
testscript-rs/.github/workflows/ci.yml
Jason Hall 424dcaf170
CI: run pre-commit (#46)
Signed-off-by: Jason Hall <imjasonh@gmail.com>
2026-01-01 18:32:25 +00:00

53 lines
1.2 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: clippy, rustfmt
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: pre-commit/action@v3.0.1
- run: cargo test --verbose
- run: |
cd examples/sample-cli
cargo test --verbose