Skip to content

build: switch oc-ds-converter from local submodule to PyPI 2.0.0 #573

build: switch oc-ds-converter from local submodule to PyPI 2.0.0

build: switch oc-ds-converter from local submodule to PyPI 2.0.0 #573

Workflow file for this run

# SPDX-FileCopyrightText: 2022-2026 Arcangelo Massari <arcangelo.massari@unibo.it>
#
# SPDX-License-Identifier: ISC
name: Run tests
on:
push:
branches:
- "**" # All branches, including those with /
pull_request:
branches: [master]
permissions:
contents: read
jobs:
CheckCoverage:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install UV
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Install Python
run: uv python install
- name: Install project dependencies
run: uv sync --locked --all-extras --dev
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libncurses6
- name: Set up Docker
uses: docker/setup-buildx-action@v3
- name: Run tests with coverage
run: |
uv run coverage run --rcfile=test/coverage/.coveragerc
uv run coverage xml
uv run coverage report
- name: Generate HTML coverage report
if: matrix.python-version == '3.12'
run: uv run coverage html -d htmlcov
- name: Generate coverage badge
if: matrix.python-version == '3.12'
run: uv run genbadge coverage -i coverage.xml -o coverage-badge.svg
- name: Upload coverage report
if: matrix.python-version == '3.12' && github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v7
with:
name: coverage-report
path: htmlcov
- name: Upload coverage badge
if: matrix.python-version == '3.12' && github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v7
with:
name: coverage-badge
path: coverage-badge.svg