Skip to content

Commit d0da788

Browse files
committed
chore: update ci
1 parent bfaf2d6 commit d0da788

File tree

2 files changed

+74
-4
lines changed

2 files changed

+74
-4
lines changed

.github/workflows/autofix.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# -------------------------------------------------------------------
2+
# ------------------------------- WARNING ---------------------------
3+
# -------------------------------------------------------------------
4+
#
5+
# This file was automatically generated by gh-workflows using the
6+
# gh-workflow-gen bin. You should add and commit this file to your
7+
# git repository. **DO NOT EDIT THIS FILE BY HAND!** Any manual changes
8+
# will be lost if the file is regenerated.
9+
#
10+
# To make modifications, update your `build.rs` configuration to adjust
11+
# the workflow description as needed, then regenerate this file to apply
12+
# those changes.
13+
#
14+
# -------------------------------------------------------------------
15+
# ----------------------------- END WARNING -------------------------
16+
# -------------------------------------------------------------------
17+
18+
name: autofix.ci
19+
env:
20+
RUSTFLAGS: -Dwarnings
21+
on:
22+
pull_request:
23+
types:
24+
- opened
25+
- synchronize
26+
- reopened
27+
branches:
28+
- main
29+
push:
30+
branches:
31+
- main
32+
jobs:
33+
lint:
34+
name: Lint Fix
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: read
38+
steps:
39+
- name: Checkout Code
40+
uses: actions/checkout@v4
41+
- name: Setup Rust Toolchain
42+
uses: actions-rust-lang/setup-rust-toolchain@v1
43+
with:
44+
toolchain: nightly
45+
components: clippy, rustfmt
46+
- name: Cargo Fmt
47+
run: cargo +nightly fmt --all
48+
- name: Cargo Clippy
49+
run: cargo +nightly clippy --fix --allow-dirty --all-features --workspace -- -D warnings
50+
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
51+
concurrency:
52+
group: autofix-${{github.ref}}
53+
cancel-in-progress: false

.github/workflows/ci.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,30 @@ jobs:
4141
- name: Setup Rust Toolchain
4242
uses: actions-rust-lang/setup-rust-toolchain@v1
4343
with:
44-
toolchain: stable, nightly
45-
components: clippy, rustfmt
44+
toolchain: stable
4645
- name: Cargo Test
4746
run: cargo test --all-features --workspace
47+
lint:
48+
name: Lint
49+
runs-on: ubuntu-latest
50+
permissions:
51+
contents: read
52+
steps:
53+
- name: Checkout Code
54+
uses: actions/checkout@v4
55+
- name: Setup Rust Toolchain
56+
uses: actions-rust-lang/setup-rust-toolchain@v1
57+
with:
58+
toolchain: nightly
59+
components: clippy, rustfmt
4860
- name: Cargo Fmt
49-
run: cargo +nightly fmt --check
61+
run: cargo +nightly fmt --all --check
5062
- name: Cargo Clippy
5163
run: cargo +nightly clippy --all-features --workspace -- -D warnings
5264
release:
5365
needs:
5466
- build
67+
- lint
5568
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
5669
name: Release
5770
runs-on: ubuntu-latest
@@ -69,11 +82,15 @@ jobs:
6982
uses: release-plz/[email protected]
7083
with:
7184
command: release
85+
concurrency:
86+
group: release-${{github.ref}}
87+
cancel-in-progress: false
7288
release-pr:
7389
needs:
7490
- build
91+
- lint
7592
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
76-
name: Release PR
93+
name: Release Pr
7794
runs-on: ubuntu-latest
7895
permissions:
7996
contents: write

0 commit comments

Comments
 (0)