libretime/.github/workflows/_python-test.yml
Jonas L. 23917f7d8f
ci: fine grained test release (#3171)
### Description

Allow fine grained configuration on which release the test should be
run. This will be useful to start testing liquidsoap >=2.0.0 in our ci.
2025-06-14 18:41:59 +02:00

47 lines
1.1 KiB
YAML

on:
workflow_call:
inputs:
context:
required: true
type: string
release:
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-test-${{ inputs.release }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/libretime/libretime-dev:${{ inputs.release }}
options: --user 1001:1001
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ inputs.release }}-pip-${{ inputs.context }}-${{ hashFiles(format('{0}/{1}', inputs.context, '**/setup.py')) }}
restore-keys: |
${{ inputs.release }}-pip-${{ inputs.context }}
- name: Test
run: make test-coverage
working-directory: ${{ inputs.context }}
- name: Report coverage
uses: codecov/codecov-action@v5
with:
files: ${{ inputs.context }}/coverage.xml
flags: ${{ inputs.context }}
name: ${{ inputs.context }}