Skip to content

add coverage badge #193

add coverage badge

add coverage badge #193

Workflow file for this run

on:
push:
branches: [main]
pull_request:
name: Continuous integration
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [msrv, stable, nightly, macos, windows]
include:
- build: msrv
os: ubuntu-latest
rust: 1.70.0
- build: stable
os: ubuntu-latest
rust: stable
- build: nightly
os: ubuntu-latest
rust: nightly
- build: macos
os: macos-latest
rust: stable
- build: windows
os: windows-latest
rust: stable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo test --all-features
fmt:
name: format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all --check
clippy:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- uses: actions-rs-plus/clippy-check@v2
with:
args: --all-features --all-targets
docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo doc --no-deps
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
# Automatically merge if it's a Dependabot PR that passes the build
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
needs: [test, fmt, clippy, docs, cargo-deny]
steps:
- uses: actions/checkout@v4
- name: Auto-merge Dependabot PRs
# Find the PR number based on the current branch name, and squash merge based on this number
run: 'PR_NUM="$(gh pr list | grep $(git branch --show-current) | cut -f1)"; gh pr merge --auto --squash $PR_NUM'
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}