[renovate] add configuration #32
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: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
name: CI | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Lint (rustfmt) | |
run: cargo xfmt --check | |
- name: Lint (clippy) | |
run: cargo clippy --all-features --all-targets | |
build: | |
name: Build and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
# 1.60 is the MSRV | |
rust-version: [ "1.60", stable ] | |
fail-fast: false | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Test | |
run: cargo nextest run --all-features | |
- name: Delete Cargo.lock and test against latest versions | |
if: matrix.rust-version == 'stable' | |
run: | | |
rm Cargo.lock | |
cargo nextest run --all-features |