nicer script print output #3
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: Rust build | |
on: | |
push: | |
branches: | |
- master | |
- main | |
paths: | |
- "**.rs" | |
- "Cargo.lock" | |
- "Cargo.toml" | |
- ".github/workflows/rust-build.yml" | |
pull_request: | |
branches: | |
- master | |
- main | |
paths: | |
- "**.rs" | |
- "Cargo.lock" | |
- "Cargo.toml" | |
- ".github/workflows/rust-build.yml" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out source repository | |
uses: actions/checkout@v4 | |
- name: Set up Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test |