Skip to content

Commit

Permalink
remove autofix.r8
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddOnTop committed Nov 22, 2024
1 parent 5632d0b commit 3304c8f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 152 deletions.
68 changes: 0 additions & 68 deletions .github/workflows/autofix.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
env:
LINT_MODE: '${{contains(github.event.pull_request.labels.*.name, ''ci: lintfix'') && ''fix'' || ''check''}}'
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand All @@ -47,6 +49,9 @@ jobs:
run: cargo +nightly fmt --check
- name: Cargo Clippy
run: cargo +nightly clippy --all-features --workspace -- -D warnings
- name: Commit and push if changed
if: env.LINT_MODE == 'fix'
uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
release:
needs: build
name: Release
Expand Down
83 changes: 0 additions & 83 deletions tests/autofix.rs

This file was deleted.

14 changes: 13 additions & 1 deletion tests/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ use toolchain::Toolchain;

#[test]
fn generate() {
let lint_mode_condition =
"contains(github.event.pull_request.labels.*.name, 'ci: lintfix') && 'fix' || 'check'";

let flags = RustFlags::deny("warnings");

let build = Job::new("Build and Test")
.add_env(("LINT_MODE", format!("${{{{{}}}}}", lint_mode_condition)))
.add_step(Step::checkout())
.add_step(
Toolchain::default()
Expand All @@ -31,7 +35,15 @@ fn generate() {
.nightly()
.args("--all-features --workspace -- -D warnings")
.name("Cargo Clippy"),
);
).add_step(
Step::uses(
"autofix-ci",
"action",
"ff86a557419858bb967097bfc916833f5647fa8c",
)
.if_condition(Expression::new("env.LINT_MODE == 'fix'"))
.name("Commit and push if changed"),
);

let event = Event::default()
.push(Push::default().add_branch("main"))
Expand Down

0 comments on commit 3304c8f

Please sign in to comment.