fix: replace Python CI with correct Rust CI workflow
This commit is contained in:
@@ -2,22 +2,47 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
branches: [ main, master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Rust
|
||||
run: rustup default stable
|
||||
- name: Build
|
||||
run: cargo build --all-features --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --all-features --verbose
|
||||
- name: Check formatting
|
||||
run: cargo fmt --check --all
|
||||
- name: Run clippy
|
||||
run: cargo clippy --all-features -- -D warnings
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Check rustfmt availability
|
||||
working-directory: ./gitignore-gen
|
||||
run: rustfmt --version
|
||||
|
||||
- name: Run Rust linting
|
||||
working-directory: ./gitignore-gen
|
||||
run: |
|
||||
cargo fmt --check
|
||||
cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Rust
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt
|
||||
|
||||
- name: Build Rust project
|
||||
working-directory: ./gitignore-gen
|
||||
run: cargo build --all-targets
|
||||
|
||||
- name: Run Rust tests
|
||||
working-directory: ./gitignore-gen
|
||||
run: cargo test
|
||||
|
||||
Reference in New Issue
Block a user