Skip to content

Commit

Permalink
chore: fix autofix PR action (#2917)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx authored Nov 4, 2024
1 parent bf3c289 commit c1d4d57
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 20 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: autofix.ci

on:
workflow_call:
pull_request:
push:
branches: ["main"]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
MISE_TRUSTED_CONFIG_PATHS: ${{ github.workspace }}
MISE_EXPERIMENTAL: 1
RUST_BACKTRACE: 1
NPM_CONFIG_FUND: false

jobs:
nightly:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
{ toolchain: nightly, components: "rustfmt, clippy", rustflags: "" }
- run: |
cargo build --all-features
echo "$PWD/target/debug" >> "$GITHUB_PATH"
- name: cache mise
uses: actions/cache@v4
with:
key: mise-tools-ubuntu-latest-${{ hashFiles('.mise.toml') }}
restore-keys: mise-tools-ubuntu-latest
path: |
~/.local/share/mise/installs
~/.local/share/mise/plugins
- run: mise install
- run: npm install
- run: "mise run snapshots ::: lint-fix ::: render && git diff HEAD"
- uses: autofix-ci/[email protected]
if: ${{ always() }}
20 changes: 0 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,8 @@ jobs:
- run: cargo msrv verify
- run: cargo machete --with-metadata
- run: ./scripts/test-standalone.sh
- run: mise settings set experimental true
if: ${{ always() }}
- run: mise run render
if: ${{ always() }}
- uses: actions-rust-lang/rustfmt@v1
if: ${{ always() }}
- run: mise run lint
if: ${{ always() }}
- run: mise run snapshots
if: ${{ always() }}
- run: mise run lint-fix && git diff HEAD
if: ${{ always() }}
- uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ always() }}
with:
commit_author: mise[bot] <[email protected]>
commit_message: "chore: apply lint fixes"

nightly:
runs-on: ubuntu-latest
Expand All @@ -104,11 +89,6 @@ jobs:
~/.local/share/mise/plugins
- run: mise install
- run: mise run test:shuffle
- run: mise run lint-fix && git diff HEAD
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_author: mise[bot] <[email protected]>
commit_message: "chore: apply lint fixes"

coverage:
name: coverage-${{matrix.tranche}}
Expand Down

0 comments on commit c1d4d57

Please sign in to comment.