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 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: actions-rs/toolchain@v1
with: with:
python-version: '3.11' profile: minimal
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: default
components: rustfmt, clippy components: rustfmt, clippy
- name: Check Rust formatting - run: cargo fmt --check
run: cargo fmt --check --all - run: cargo clippy -- -D warnings
- name: Run Rust clippy
run: cargo clippy --all -- -D warnings
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: lint
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Rust - uses: actions-rs/toolchain@v1
uses: actions-rs/toolchain@v1
with: with:
toolchain: stable profile: minimal
profile: default
components: rustfmt components: rustfmt
- name: Build gitignore-gen - run: cargo test --all
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