### 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.
47 lines
1.1 KiB
YAML
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 }}
|