feat: replaced views with own types #25
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: Test & Release | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: '-D warnings' | |
CARGO_INCREMENTAL: 0 | |
RUST_BACKTRACE: short | |
jobs: | |
clippy: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install libudev (Linux only) | |
if: runner.os == 'Linux' | |
run: sudo apt-get -y install libudev-dev libsystemd-dev | |
- name: Run clippy | |
run: cargo clippy --all-targets -- -D clippy::all -D clippy::nursery | |
cargo-fmt: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run cargo fmt | |
run: cargo fmt --check | |
cargo-doc: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install libudev (Linux only) | |
if: runner.os == 'Linux' | |
run: sudo apt-get -y install libudev-dev libsystemd-dev | |
- name: run cargo doc | |
run: RUSTDOCFLAGS="-D warnings" cargo doc | |
check-windows: | |
needs: cargo-fmt | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run cargo check | |
run: cargo check --release | |
no_features_check: | |
needs: cargo-fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run cargo check | |
run: cargo check --no-default-features | |
test: | |
needs: cargo-fmt | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
toolchain: [stable] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "${{ matrix.toolchain }}" | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
default: true | |
- uses: Swatinem/rust-cache@v1 | |
- name: Install libudev (Linux only) | |
if: runner.os == 'Linux' | |
run: sudo apt-get -y install libudev-dev libsystemd-dev | |
- name: Check with stable features | |
run: cargo check --verbose | |
- name: Run tests with unstable features | |
run: cargo test --verbose |