Fix CI workflow - add system dependencies and proper test setup
All checks were successful
CI / test (push) Successful in 27s
All checks were successful
CI / test (push) Successful in 27s
This commit is contained in:
@@ -11,57 +11,29 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install Poetry
|
- name: Install system dependencies
|
||||||
uses: snok/install-poetry@v1
|
|
||||||
with:
|
|
||||||
virtualenvs-create: true
|
|
||||||
virtualenvs-in-project: true
|
|
||||||
installer-parallel: true
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
run: |
|
||||||
poetry install --with dev
|
apt-get update
|
||||||
|
apt-get install -y graphviz
|
||||||
|
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: |
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install -e .
|
||||||
|
|
||||||
|
- name: Run linters
|
||||||
|
run: |
|
||||||
|
pip install ruff mypy
|
||||||
|
ruff check src tests
|
||||||
|
python -m mypy src
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
poetry run pytest tests/ -v
|
pytest tests/unit/ -v
|
||||||
|
pytest tests/integration/ -v
|
||||||
- name: Run linting
|
|
||||||
run: |
|
|
||||||
poetry run ruff check src tests
|
|
||||||
|
|
||||||
- name: Run type checking
|
|
||||||
run: |
|
|
||||||
poetry run mypy src
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
|
|
||||||
- name: Install Poetry
|
|
||||||
uses: snok/install-poetry@v1
|
|
||||||
with:
|
|
||||||
virtualenvs-create: true
|
|
||||||
virtualenvs-in-project: true
|
|
||||||
installer-parallel: true
|
|
||||||
|
|
||||||
- name: Build package
|
|
||||||
run: |
|
|
||||||
poetry build
|
|
||||||
|
|
||||||
- name: Verify build
|
|
||||||
run: |
|
|
||||||
poetry run pip install dist/*.whl --dry-run
|
|
||||||
|
|||||||
Reference in New Issue
Block a user