Skip to content

run cargo fmt and fix ci (#1) #3

run cargo fmt and fix ci (#1)

run cargo fmt and fix ci (#1) #3

Workflow file for this run

name: Cargo Build & Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust: 1.76.0 # MSRV
- rust: stable
test_all: --all
- rust: beta
test_all: --all
- rust: nightly
test_all: --all
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Build
run: |
cargo build --verbose
- name: Tests
run: |
cargo test --verbose
rustfmt:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
include:
- rust: stable
rustfmt: rustfmt
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: ${{ matrix.rustfmt }}
override: true
- name: Rustfmt
if: matrix.rustfmt
run: cargo fmt -- --check