fix: add Gitea Actions CI workflow and fix logic bugs
- Created .gitea/workflows/ci.yml with lint, build, and test jobs - Fixed scope extraction bug in analyzer.rs (src/main.rs now returns "src") - Fixed renamed file path assignment in git.rs (correct old_path/new_path)
This commit is contained in:
37
.gitea/workflows/ci.yml
Normal file
37
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust
|
||||
run: rustup default stable
|
||||
- name: Check formatting
|
||||
run: cargo fmt --check --all
|
||||
- name: Clippy
|
||||
run: cargo clippy --all -- -D warnings
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust
|
||||
run: rustup default stable
|
||||
- name: Build
|
||||
run: cargo build --release
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust
|
||||
run: rustup default stable
|
||||
- name: Run tests
|
||||
run: cargo test
|
||||
Reference in New Issue
Block a user