Skip to content

chore(pre-commit.ci): pre-commit autoupdate #2

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
version: 2

updates:

- package-ecosystem: github-actions
directory: /
schedule:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
name: Rust CI

on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
# Required by cargo-insta: https://insta.rs/docs/quickstart/#continuous-integration
CI: true
SCCACHE_GHA_ENABLED: true
RUSTC_WRAPPER: sccache

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
# This will ensure that only one commit will be running tests at a time on each PR.
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
# Run on external PRs and pushes to branches on the repo
Expand All @@ -29,118 +25,93 @@ jobs:
matrix:
rust: [stable]
os: [ubuntu-latest, macos-latest, windows-latest]

name: Build & test
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}

- name: Cache Cargo registry
uses: Swatinem/rust-cache@v2
with:
shared-key: 'rust-ci'
cache-bin: 'false'

- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- name: Fetch dependencies
run: cargo +${{ matrix.rust }} fetch --locked

- name: Build
run: cargo +${{ matrix.rust }} build --all-features --tests

- name: Test
run: cargo +${{ matrix.rust }} test run --all-features

clippy:
if: github.event_name == 'push' || github.event_name == 'schedule' || github.event.pull_request.head.repo.full_name != github.repository

name: Clippy lint checks
runs-on: ubuntu-latest
needs: ["build"]
steps:
- name: Checkout source
uses: actions/checkout@v4

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

- name: Cache Cargo registry
uses: Swatinem/rust-cache@v2
with:
shared-key: 'rust-ci'
cache-bin: 'false'
save-if: 'false'

- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- name: Run clippy
run: cargo clippy --no-deps --all-targets -- -D warnings

rustfmt:
if: github.event_name == 'push' || github.event_name == 'schedule' || github.event.pull_request.head.repo.full_name != github.repository

name: Code formatting checks
runs-on: ubuntu-latest
needs: ["build"]
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt

- name: Cache Cargo registry
uses: Swatinem/rust-cache@v2
with:
shared-key: 'rust-ci'
cache-bin: 'false'
save-if: 'false'

- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- name: Run fmt
run: cargo fmt --all -- --check

machete:
if: github.event_name == 'push' || github.event_name == 'schedule' || github.event.pull_request.head.repo.full_name != github.repository

name: Machete dependencies checks
runs-on: ubuntu-latest
needs: ["build"]
steps:
- name: Checkout source
uses: actions/checkout@v4

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

- name: Cache Cargo registry
uses: Swatinem/rust-cache@v2
with:
shared-key: 'rust-ci'
cache-bin: 'false'
save-if: 'false'

- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- name: Run cargo-machete
uses: bnjbvr/[email protected]
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
args: ["--fix=lf"]
- id: trailing-whitespace
- repo: https://github.com/google/yamlfmt
rev: v0.16.0
rev: v0.17.0
hooks:
- id: yamlfmt
types_or: [json, yaml]
Expand Down
Loading