Skip to content

docs: fix github action badge #83

docs: fix github action badge

docs: fix github action badge #83

Workflow file for this run

name: tests
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
- 'dev'
jobs:
tests:
strategy:
matrix:
# minimum supported rust version
rust: [1.61.0, stable]
on:
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
- { os: macos-latest, target: x86_64-apple-darwin }
- { os: windows-latest, target: x86_64-pc-windows-msvc }
include:
- use-cross: false
runs-on: ${{ matrix.on.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.on.target }}
override: true
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.use-cross }}
command: generate-lockfile
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.rust }}-${{ matrix.on.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build tests
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.use-cross }}
command: test
args: --no-run --target ${{ matrix.on.target }}
- name: Run tests
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.use-cross }}
command: test
args: --target ${{ matrix.on.target }}
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install minimal toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Run rustdoc
env:
RUSTDOCFLAGS: -D warnings
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --document-private-items
clippy:
runs-on: ubuntu-latest
strategy:
matrix:
feature: [default, cli-error, error, report]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: clippy
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: clippy-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --no-default-features --features ${{ matrix.feature }} -- -D warnings