fix: simplified CI workflow for package installation verification
This commit is contained in:
@@ -7,9 +7,42 @@ on:
|
|||||||
branches: [main, master]
|
branches: [main, master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.9", "3.10", "3.11"]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -e .
|
||||||
|
|
||||||
|
- name: Run unit tests
|
||||||
|
run: pytest tests/unit/ -v
|
||||||
|
|
||||||
|
- name: Run integration tests
|
||||||
|
run: pytest tests/integration/ -v
|
||||||
|
|
||||||
|
- name: Run tests with coverage
|
||||||
|
run: python -m pytest tests/ --cov=api_testgen
|
||||||
|
|
||||||
|
- name: Upload coverage report
|
||||||
|
uses: codecov/codecov-action@v4
|
||||||
|
with:
|
||||||
|
files: ./coverage.xml
|
||||||
|
fail_ci_if_error: false
|
||||||
|
|
||||||
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -19,17 +52,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
|
|
||||||
- name: Check Python version
|
- name: Install linting tools
|
||||||
run: python --version
|
run: pip install ruff mypy
|
||||||
|
|
||||||
- name: Check files
|
- name: Run ruff
|
||||||
run: ls -la
|
run: ruff check .
|
||||||
|
|
||||||
- name: Install package
|
- name: Run mypy
|
||||||
run: |
|
run: mypy api_testgen/ --ignore-missing-imports
|
||||||
pip install --upgrade pip
|
|
||||||
pip install -e . 2>&1 || echo "Install failed but continuing"
|
|
||||||
|
|
||||||
- name: Verify installation
|
|
||||||
run: |
|
|
||||||
python -c "import api_testgen; print('OK')" 2>&1 || echo "Import failed"
|
|
||||||
Reference in New Issue
Block a user