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

chore: fix autofix PR action #2917

Merged
merged 1 commit into from
Nov 4, 2024
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
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
Loading