Update rust.yml

This commit is contained in:
jb-alvarado 2022-05-07 22:13:13 +02:00 committed by GitHub
parent b163594249
commit d062e14349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,25 +1,22 @@
name: Rust name: rust
on: [push, pull_request]
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs: jobs:
build: build:
strategy:
runs-on: ubuntu-latest matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- name: Build and test - run: rustup update stable
- run: rustup component add rustfmt - name: Cache cargo build
- run: rustup component add clippy uses: actions/cache@v1
- run: cargo build --all-features with:
- run: cargo test --all-features path: target
- run: cargo fmt --all -- --check key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- run: cargo clippy --all-features --all-targets -- --deny warnings - run: rustup component add rustfmt
- run: rustup component add clippy
- run: cargo build --all-features
- run: cargo test --all-features
- run: cargo fmt --all -- --check
- run: cargo clippy --all-features --all-targets -- --deny warnings