1
0
Fork 0
mirror of https://github.com/imjasonh/testscript-rs synced 2026-07-14 20:55:15 +00:00

CI: run pre-commit (#46)

Signed-off-by: Jason Hall <imjasonh@gmail.com>
This commit is contained in:
Jason Hall 2026-01-01 13:32:25 -05:00 committed by GitHub
parent 90cc92fffe
commit 424dcaf170
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 73 additions and 74 deletions

View file

@ -2,9 +2,9 @@ name: CI
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
env:
CARGO_TERM_COLOR: always
@ -20,42 +20,34 @@ jobs:
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: clippy, rustfmt
- 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 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 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') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests
run: cargo test --verbose
- name: Run clippy
run: cargo clippy --all-targets -- -D warnings
- name: Check formatting
run: cargo fmt -- --check
- name: Test sample-cli example
run: |
cd examples/sample-cli
cargo test --verbose
- uses: pre-commit/action@v3.0.1
- run: cargo test --verbose
- run: |
cd examples/sample-cli
cargo test --verbose