Uses LazyLock #41
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
on: [pull_request, push] | |
jobs: | |
lint_fmt: | |
name: cargo fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
- name: Check formating | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
lint_clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Run clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --features mock -- --deny warnings | |
tests: | |
name: Tests | |
strategy: | |
matrix: | |
mode: ["debug", "release"] | |
package: ["rp-sys", "redpitaya"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Run tests (debug) | |
if: matrix.mode == 'debug' | |
run: cargo test --jobs 1 --features mock --package "${{ matrix.package }}" | |
- name: Run tests (release) | |
if: matrix.mode == 'release' | |
run: cargo test --jobs 1 --features mock --package "${{ matrix.package }}" --release |