fix: resolve CI rustfmt not installed error
Some checks failed
CI / lint (push) Failing after 4s
CI / test (push) Has been skipped

This commit is contained in:
2026-02-04 04:51:50 +00:00
parent 46ae13bec7
commit 36ca494bed

View File

@@ -11,50 +11,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions-rs/toolchain@v1
with:
python-version: '3.11'
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: default
profile: minimal
components: rustfmt, clippy
- name: Check Rust formatting
run: cargo fmt --check --all
- name: Run Rust clippy
run: cargo clippy --all -- -D warnings
- run: cargo fmt --check
- run: cargo clippy -- -D warnings
test:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: default
profile: minimal
components: rustfmt
- name: Build gitignore-gen
run: cargo build --all
- name: Run tests
run: cargo test --all
release:
needs: [lint, test]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: default
- name: Build release
run: cargo build --release --tarball
- name: Create Release
uses: https://gitea.com/actions/release-action@main
with:
files: |
target/release/gitignore-gen
- run: cargo test --all