Skip to content

Delete table database versioning (revised PR with unit tests) #1385

Delete table database versioning (revised PR with unit tests)

Delete table database versioning (revised PR with unit tests) #1385

Workflow file for this run

---
name: Test DaaP Applications
on: # yamllint disable-line rule:truthy
pull_request:
branches:
- main
paths:
- containers/daap-*/**
push:
branches:
- main
paths:
- containers/daap-*/**
jobs:
detect-changes:
name: Detect Changes
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
containers: ${{ steps.detect_changes.outputs.changes }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Generate pytest path filter file
run: bash scripts/path-filter/configuration-generator.sh pytest
- name: Detect changes
id: detect_changes
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
with:
filters: .github/path-filter/pytest.yml
run-tests:
name: Test python
if: ${{ needs.detect-changes.outputs.containers != '[]' }}
needs: [detect-changes]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container: ${{ fromJson(needs.detect-changes.outputs.containers) }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Python 3.11
if: ${{ matrix.container != 'daap-push-to-catalogue'}}
id: setup_python3_11
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: 3.11
cache: pip
cache-dependency-path: containers/${{ matrix.container }}/tests/requirements.txt
- name: Setup Python 3.10
if: ${{ matrix.container == 'daap-push-to-catalogue'}}
id: setup_python3_10
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: 3.10.10
cache: pip
cache-dependency-path: containers/${{ matrix.container }}/tests/requirements.txt
- name: Install test dependencies
run: python -m pip install -r requirements.txt
working-directory: containers/${{ matrix.container }}/tests/
- name: Run tests
run: pytest -vv
working-directory: containers/${{ matrix.container }}/tests/unit/