add tests to github worklfows

This commit is contained in:
maxDorninger
2025-06-07 17:08:46 +02:00
parent 5c646db42a
commit 0aa7f121a1
2 changed files with 63 additions and 0 deletions

View File

@@ -14,10 +14,36 @@ on:
- 'pyproject.toml'
- 'uv.lock'
- '.github/workflows/build-push-backend.yml'
- 'tests/**'
workflow_dispatch:
jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.13" ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: pip install uv
- name: Install dependencies
run: uv pip install .[dev]
- name: Run tests
run: pytest
build-and-push:
needs: run-tests
runs-on: ubuntu-latest
permissions:
contents: read

37
.github/workflows/python-tests.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Run Python Tests
on:
pull_request:
branches: [ master ]
paths:
- 'media_manager/**'
- 'alembic/**'
- 'alembic.ini'
- 'pyproject.toml'
- 'uv.lock'
- '.github/workflows/python-tests.yml'
- 'tests/**'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.13" ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: pip install uv
- name: Install dependencies
run: uv pip install .[dev]