wakey/.github/workflows/rust.yml
dependabot[bot] 7661e1e84b
Bump Swatinem/rust-cache from 2.2.1 to 2.4.0 (#23)
Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 2.2.1 to 2.4.0.
- [Release notes](https://github.com/Swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Swatinem/rust-cache/compare/v2.2.1...v2.4.0)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 10:13:58 +02:00

103 lines
2.5 KiB
YAML

name: Rust
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout Sources
uses: actions/checkout@v3
- name: Install Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Rust Cache
uses: Swatinem/rust-cache@v2.4.0
- name: Run tests
run: cargo test --verbose
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout Sources
uses: actions/checkout@v3
- name: Install Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Install Clippy
run: rustup component add clippy
- name: Install RustFmt
run: rustup component add rustfmt
- name: Rust Cache
uses: Swatinem/rust-cache@v2.4.0
- name: Run format check
run: cargo fmt --all --check
- name: Run clippy
run: cargo clippy --all --all-targets -- -D warnings
audit:
name: Audit
runs-on: ubuntu-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Install Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Install Audit
run: cargo install cargo-audit
- name: Rust Cache
uses: Swatinem/rust-cache@v2.4.0
- name: Run Audit
uses: actions-rs/cargo@v1
with:
command: audit
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rv: [stable, beta, nightly]
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout Sources
uses: actions/checkout@v3
- name: Install Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rv }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2.4.0
- name: Cargo Build
uses: actions-rs/cargo@v1
with:
command: build