Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync repo templates ⚙ #477

Merged
merged 1 commit into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Maintained in https://github.com/coreos/repo-templates
# Do not edit downstream.

version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- area/dependencies
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- area/dependencies
49 changes: 26 additions & 23 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
---
name: Rust
# Maintained in https://github.com/coreos/repo-templates
# Do not edit downstream.

name: Rust
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]

branches: [main]
permissions:
contents: read

# don't waste job slots on superseded code
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
# Pinned toolchain for linting
ACTION_LINTS_TOOLCHAIN: 1.66.0
ACTIONS_LINTS_TOOLCHAIN: 1.66.0

jobs:
tests-stable:
name: "Tests, stable toolchain"
name: Tests, stable toolchain
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- name: Check out repository
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@v1
Expand All @@ -31,10 +36,10 @@ jobs:
- name: cargo test
run: cargo test
tests-release-stable:
name: "Tests (release), stable toolchain"
name: Tests (release), stable toolchain
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- name: Check out repository
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@v1
Expand All @@ -45,15 +50,15 @@ jobs:
- name: cargo test (release)
run: cargo test --release
tests-release-msrv:
name: "Tests (release), minimum supported toolchain"
name: Tests (release), minimum supported toolchain
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- name: Check out repository
uses: actions/checkout@v3
- name: Detect crate MSRV
run: |
msrv=$(cargo metadata --format-version 1 --no-deps | \
jq -r '.packages | .[].rust_version')
jq -r '.packages[0].rust_version')
echo "Crate MSRV: $msrv"
echo "MSRV=$msrv" >> $GITHUB_ENV
- name: Install toolchain
Expand All @@ -65,31 +70,29 @@ jobs:
- name: cargo test (release)
run: cargo test --release
linting:
name: "Lints, pinned toolchain"
name: Lints, pinned toolchain
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- name: Check out repository
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env['ACTION_LINTS_TOOLCHAIN'] }}
toolchain: ${{ env.ACTIONS_LINTS_TOOLCHAIN }}
components: rustfmt, clippy
- name: cargo clippy (warnings)
run: cargo clippy -- -D warnings
- name: cargo fmt (check)
run: cargo fmt -- --check -l
- name: cargo clippy (warnings)
run: cargo clippy -- -D warnings
tests-other-channels:
name: "Tests, unstable toolchain"
name: Tests, unstable toolchain
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
channel:
- "beta"
- "nightly"
channel: [beta, nightly]
steps:
- name: Checkout repository
- name: Check out repository
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@v1
Expand Down