Ability to optionally log #4
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: Rust | |
on: | |
push: | |
branches: [main] | |
tags: | |
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
RUST_BACKTRACE: short | |
RUSTUP_MAX_RETRIES: 10 | |
jobs: | |
checks: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
toolchain: | |
- 1.71.0 | |
- stable | |
- nightly | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: extractions/setup-just@v1 | |
with: | |
just-version: 1.10.0 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
profile: minimal | |
override: true | |
components: rustfmt, clippy | |
target: x86_64-unknown-linux-musl | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ runner.os }}-${{ hashFiles('Cargo.toml') }}-${{ matrix.toolchain }} | |
- name: Install musl tools | |
run: sudo apt-get install -y musl-tools | |
- name: Build | |
run: cargo build | |
- name: Run tests | |
run: just test | |
- name: clippy | |
run: cargo clippy -- --deny "warnings" | |
- name: fmt | |
run: cargo fmt -- --check |