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