mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-18 02:54:07 +02:00
add tests to github worklfows
This commit is contained in:
26
.github/workflows/build-push-backend.yml
vendored
26
.github/workflows/build-push-backend.yml
vendored
@@ -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
37
.github/workflows/python-tests.yml
vendored
Normal 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]
|
||||
Reference in New Issue
Block a user