fix: resolve CI rustfmt not installed error
This commit is contained in:
@@ -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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user