fix: resolve CI test failures and update test configuration
This commit is contained in:
@@ -7,60 +7,48 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Rust
|
- uses: actions/checkout@v4
|
||||||
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
|
|
||||||
|
|
||||||
- name: Install system dependencies
|
- uses: actions/setup-python@v5
|
||||||
run: |
|
with:
|
||||||
sudo apt-get update
|
python-version: '3.11'
|
||||||
sudo apt-get install -y libgit2-dev pkg-config cmake libssl-dev
|
|
||||||
|
|
||||||
- name: Build
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
pip install -e ".[test]"
|
||||||
cargo build --release 2>&1
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: PYTHONPATH=src:$PYTHONPATH pytest tests/unit/ tests/integration/ -v --tb=short
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
|
||||||
cargo test --all 2>&1
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Rust
|
- uses: actions/checkout@v4
|
||||||
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
|
|
||||||
|
|
||||||
- name: Install system dependencies
|
- uses: actions/setup-python@v5
|
||||||
run: |
|
with:
|
||||||
sudo apt-get update
|
python-version: '3.11'
|
||||||
sudo apt-get install -y libgit2-dev pkg-config cmake libssl-dev
|
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Install linting tools
|
||||||
run: |
|
run: pip install ruff>=0.1.0
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
|
||||||
cargo clippy --all-features -- -D warnings 2>&1
|
|
||||||
|
|
||||||
format:
|
- name: Run ruff linter
|
||||||
|
run: ruff check src/depcheck/
|
||||||
|
|
||||||
|
type-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Rust
|
- uses: actions/checkout@v4
|
||||||
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
|
|
||||||
|
|
||||||
- name: Check formatting
|
- uses: actions/setup-python@v5
|
||||||
run: |
|
with:
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
python-version: '3.11'
|
||||||
cargo fmt --all -- --check 2>&1
|
|
||||||
|
- 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