run pytest on the pr build workflow

This commit is contained in:
Kenneth Bingham 2025-03-04 18:39:02 -05:00
parent 798f658178
commit 260b4d81fb
No known key found for this signature in database
GPG Key ID: 31709281860130B6
7 changed files with 49 additions and 2 deletions

View File

@ -88,6 +88,43 @@ jobs:
path: ${{ steps.solve_go_bin.outputs.go_bin }}/zrok
if-no-files-found: error
pytest:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash
working-directory: sdk/python/src/
run: |
set -o pipefail
set -o xtrace
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Test with pytest
shell: bash
working-directory: sdk/python/src/
run: |
set -o pipefail
set -o xtrace
pytest --cov=zrok_api
# build a release candidate container image for branches named "main" or like "v*"
rc-container-build:
needs: ubuntu-build

1
.gitignore vendored
View File

@ -41,3 +41,4 @@ sdk/nodejs/sdk/dist
# py module artifacts
*.egg-info/
__pycache__/
.coverage

View File

@ -8,7 +8,6 @@ git_push.sh
pyproject.toml
.github/workflows/python.yml
tox.ini
test-requirements.txt
#
## custom files that must not be overwritten

View File

@ -57,6 +57,7 @@ docs/Verify200Response.md
docs/VerifyRequest.md
docs/VersionInventory200Response.md
requirements.txt
test-requirements.txt
test/__init__.py
test/test_access201_response.py
test/test_access_request.py

View File

@ -1 +0,0 @@
from . import environment # noqa

View File

@ -0,0 +1,4 @@
urllib3 >= 1.25.3, < 3.0.0
python_dateutil >= 2.8.2
pydantic >= 2
typing-extensions >= 4.7.1

View File

@ -0,0 +1,6 @@
pytest >= 7.2.1
pytest-cov >= 2.8.1
tox >= 3.9.0
flake8 >= 4.0.0
types-python-dateutil >= 2.8.19.14
mypy >= 1.5