diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6b55a57..db69680 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,5 @@ version: 2 - updates: - - package-ecosystem: github-actions directory: / schedule: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 498ab8c..1b9318f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,11 +1,9 @@ name: Rust CI - on: push: pull_request: schedule: - cron: "0 0 * * *" - env: CARGO_TERM_COLOR: always CARGO_INCREMENTAL: 0 @@ -13,13 +11,11 @@ env: 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 @@ -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/sccache-action@v0.0.9 - - 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/sccache-action@v0.0.9 - - 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/sccache-action@v0.0.9 - - 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/sccache-action@v0.0.9 - - name: Run cargo-machete uses: bnjbvr/cargo-machete@v0.8.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d9eab11..2642cd5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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]