Skip to content

Commit

Permalink
Merge pull request #8 from jwodder/renovate
Browse files Browse the repository at this point in the history
Switch from Dependabot to Renovate
  • Loading branch information
jwodder authored May 19, 2024
2 parents 4de3b26 + e739b6a commit 73415f9
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 41 deletions.
29 changes: 0 additions & 29 deletions .github/dependabot.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>jwodder/renovate-config:config.json5"],
}
54 changes: 42 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
os:
- ubuntu-latest
toolchain:
- minimal
- msrv
- stable
- beta
- nightly
Expand All @@ -35,26 +35,26 @@ jobs:
uses: actions/checkout@v4

- name: Install Rust
if: matrix.toolchain != 'minimal'
if: matrix.toolchain != 'msrv'
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}

- name: Determine minimal supported Rust
if: matrix.toolchain == 'minimal'
id: minimal-version
- name: Determine minimum supported Rust version
if: matrix.toolchain == 'msrv'
id: msrv
run: |
rust_version="$(cargo metadata --no-deps --format-version=1 | jq -r '.packages[0].rust_version')"
echo "msrv=$rust_version" >> "$GITHUB_OUTPUT"
- name: Install minimal supported Rust
if: matrix.toolchain == 'minimal'
- name: Install minimum supported Rust version
if: matrix.toolchain == 'msrv'
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.minimal-version.outputs.msrv }}
toolchain: ${{ steps.msrv.outputs.msrv }}

- name: Activate cache
if: "!startsWith(github.head_ref, 'dependabot/')"
if: "!startsWith(github.head_ref, 'renovate/')"
uses: Swatinem/rust-cache@v2

- name: Install cargo-hack
Expand All @@ -66,6 +66,36 @@ jobs:
- name: Test crate
run: cargo hack --feature-powerset --exclude-features examples test --verbose

minimal-versions:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Install nightly Rust
# Needed by cargo-minimal-versions
run: rustup update nightly

- name: Activate cache
if: "!startsWith(github.head_ref, 'renovate/')"
uses: Swatinem/rust-cache@v2

- name: Install cargo-hack and cargo-minimal-versions
uses: taiki-e/install-action@v2
with:
tool: cargo-hack,cargo-minimal-versions

- name: Build crate
run: cargo minimal-versions --direct --feature-powerset --exclude-features=examples build --all-targets --verbose

- name: Test crate
run: cargo minimal-versions --direct --feature-powerset --exclude-features=examples test --verbose

coverage:
# This is separate from the main tests because cargo-llvm-cov doesn't run
# doctests.
Expand All @@ -81,7 +111,7 @@ jobs:
components: llvm-tools

- name: Activate cache
if: "!startsWith(github.head_ref, 'dependabot/')"
if: "!startsWith(github.head_ref, 'renovate/')"
uses: Swatinem/rust-cache@v2

- name: Install cargo-llvm-cov
Expand Down Expand Up @@ -112,7 +142,7 @@ jobs:
components: clippy, rustfmt

- name: Activate cache
if: "!startsWith(github.head_ref, 'dependabot/')"
if: "!startsWith(github.head_ref, 'renovate/')"
uses: Swatinem/rust-cache@v2

- name: Install cargo-hack
Expand All @@ -136,7 +166,7 @@ jobs:
toolchain: nightly

- name: Activate cache
if: "!startsWith(github.head_ref, 'dependabot/')"
if: "!startsWith(github.head_ref, 'renovate/')"
uses: Swatinem/rust-cache@v2

- name: Check docs
Expand Down

0 comments on commit 73415f9

Please sign in to comment.