fix: resolve CI test failures and update test configuration
This commit is contained in:
@@ -7,60 +7,48 @@ on:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Rust
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
rustc --version
|
||||
cargo --version
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgit2-dev pkg-config cmake libssl-dev
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Build
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cargo build --release 2>&1
|
||||
pip install -e ".[test]"
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cargo test --all 2>&1
|
||||
run: PYTHONPATH=src:$PYTHONPATH pytest tests/unit/ tests/integration/ -v --tb=short
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Rust
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
rustup component add clippy
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgit2-dev pkg-config cmake libssl-dev
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Run clippy
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cargo clippy --all-features -- -D warnings 2>&1
|
||||
- name: Install linting tools
|
||||
run: pip install ruff>=0.1.0
|
||||
|
||||
format:
|
||||
- name: Run ruff linter
|
||||
run: ruff check src/depcheck/
|
||||
|
||||
type-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Rust
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
rustup component add rustfmt
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check formatting
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cargo fmt --all -- --check 2>&1
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install type checker
|
||||
run: pip install mypy>=1.0.0
|
||||
|
||||
- name: Run mypy type checker
|
||||
run: mypy src/depcheck/ --ignore-missing-imports
|
||||
|
||||
Reference in New Issue
Block a user