ci: add test run
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
name: Full CI
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.11", "3.12", "3.13"]
|
||||
|
||||
steps:
|
||||
- name: Install Libraries
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgl1 libegl1
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
pip install uv
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -e .[test]
|
||||
|
||||
- name: Run Pytest with Coverage
|
||||
id: coverage
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
pytest --random-order --cov=./ --cov-config=./pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail ./tests/
|
||||
@@ -9,6 +9,9 @@ description = "Common components (models, calculations) for Aare packages"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = [
|
||||
"yaml",
|
||||
"jfjoch-client",
|
||||
"pydantic",
|
||||
"numpy",
|
||||
"opencv-python",
|
||||
"pillow"
|
||||
@@ -17,6 +20,8 @@ dependencies = [
|
||||
[project.optional-dependencies]
|
||||
test = [
|
||||
"pytest",
|
||||
"pytest-cov",
|
||||
"pytest-random-order"
|
||||
]
|
||||
|
||||
[[tool.uv.index]]
|
||||
|
||||
Reference in New Issue
Block a user