From b9f955fa3f049a3f4646b14436ff68e809fc7d67 Mon Sep 17 00:00:00 2001 From: maxDorninger <97409287+maxDorninger@users.noreply.github.com> Date: Sat, 7 Jun 2025 17:19:03 +0200 Subject: [PATCH] fix github worklfows testing python code --- .github/workflows/build-push-backend.yml | 20 ++++++-------------- .github/workflows/python-tests.yml | 24 +++++++++--------------- 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build-push-backend.yml b/.github/workflows/build-push-backend.yml index b74f674..03e8c94 100644 --- a/.github/workflows/build-push-backend.yml +++ b/.github/workflows/build-push-backend.yml @@ -19,28 +19,20 @@ on: jobs: run-tests: + name: Run Python 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 }} + - uses: actions/checkout@v4 - name: Install uv - run: pip install uv + uses: astral-sh/setup-uv@v5 - - name: Install dependencies - run: uv pip install .[dev] + - name: Install the project + run: uv sync --locked --all-extras --dev - name: Run tests - run: pytest + run: uv run pytest tests build-and-push: needs: run-tests diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 8f594cd..c072615 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -13,25 +13,19 @@ on: - 'tests/**' workflow_dispatch: - jobs: - test: + run-tests: + name: Run Python 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 }} + - uses: actions/checkout@v4 - name: Install uv - run: pip install uv + uses: astral-sh/setup-uv@v5 - - name: Install dependencies - run: uv pip install .[dev] \ No newline at end of file + - name: Install the project + run: uv sync --locked --all-extras --dev + + - name: Run tests + run: uv run pytest tests \ No newline at end of file