Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 43 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,54 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov pytest-xdist pytest-timeout
pip install pytest pytest-xdist pytest-timeout

- name: Check Python version
run: |
python --version
python -c "import sys; print(f'Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}')"

- name: Run tests with pytest
run: |
pytest tests/ -v --tb=short
continue-on-error: false

coverage:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.13']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov pytest-xdist pytest-timeout

- name: Check Python version
run: |
python --version
python -c "import sys; print(f'Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}')"

- name: Run tests with coverage
run: |
pytest tests/ -v --cov=vnc_lib --cov-report=xml --cov-report=html --cov-report=term-missing --tb=short
continue-on-error: false
Expand Down Expand Up @@ -124,7 +164,7 @@ jobs:

build:
runs-on: ubuntu-latest
needs: [test, lint]
needs: [test, coverage, lint]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -152,7 +192,7 @@ jobs:

coverage-report:
runs-on: ubuntu-latest
needs: test
needs: coverage
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
5 changes: 0 additions & 5 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ addopts =
-v
--strict-markers
--tb=short
--cov=vnc_lib
--cov-report=term-missing
--cov-report=html
--cov-report=xml
--cov-fail-under=65

# Coverage options
[coverage:run]
Expand Down
Loading