Skip to content

Fix cc.id changes not waterfalling into cdl and mediaref #10

Fix cc.id changes not waterfalling into cdl and mediaref

Fix cc.id changes not waterfalling into cdl and mediaref #10

Workflow file for this run

name: Code Quality
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
# Set permissions for the workflow
permissions:
contents: read
pull-requests: write
checks: write
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev,docs]
- name: Run Ruff linting
id: ruff-lint
continue-on-error: true
run: |
echo "::group::Ruff Linting"
ruff check . --output-format=github --exit-non-zero-on-fix
echo "::endgroup::"
- name: Run Ruff formatting check
id: ruff-format
continue-on-error: true
run: |
echo "::group::Ruff Formatting"
ruff format --check --diff .
echo "::endgroup::"
- name: Run mypy type checking
id: mypy
continue-on-error: true
run: |
echo "::group::MyPy Type Checking"
mypy cdl_convert \
--config-file=pyproject.toml \
--show-error-codes \
--show-column-numbers \
--show-error-context \
--pretty \
--no-error-summary
echo "::endgroup::"
- name: Build documentation
id: docs
continue-on-error: true
run: |
echo "::group::Documentation Build"
cd docs
# Build with warnings as errors (-W flag)
sphinx-build -W --keep-going -b html . _build/html
echo "::endgroup::"
- name: Check quality gate
if: always()
run: |
if [ "${{ steps.ruff-lint.outcome }}" == "failure" ] || \
[ "${{ steps.ruff-format.outcome }}" == "failure" ] || \
[ "${{ steps.mypy.outcome }}" == "failure" ] || \
[ "${{ steps.docs.outcome }}" == "failure" ]; then
echo "Quality checks failed"
exit 1
fi