Skip to content

Commit

Permalink
chore: fix autolint action (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx authored Nov 4, 2024
1 parent 2cac664 commit 99e0e4e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: autofix.ci
on:
workflow_call:
pull_request:
push:
branches: ["main"]
permissions:
contents: read

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

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
shared-key: test
save-if: false
- uses: jdx/mise-action@v2
- run: mise r autofix
- uses: autofix-ci/action@v1.3.1
9 changes: 0 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ concurrency:
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MISE_EXPERIMENTAL: 1

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: Swatinem/rust-cache@v2
with:
shared-key: test
Expand All @@ -29,7 +24,3 @@ jobs:
- run: mise r build
- run: mise r test
- run: mise r lint
- run: "mise r render ::: lint-fix ::: snapshots"
if: ${{ always() }}
- if: ${{ github.ref_name != 'main' && always() }}
uses: stefanzweifel/git-auto-commit-action@v5
3 changes: 3 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ gh = "latest"
"cargo:git-cliff" = "latest"
"npm:prettier" = "latest"

[tasks.autofix]
depends = ["render", "lint-fix", "snapshots"]

[tasks.build]
sources = ['{cli/,}src/**/*.rs', '{cli/,}Cargo.toml']
outputs = ['target/debug/rtx']
Expand Down

0 comments on commit 99e0e4e

Please sign in to comment.