Merge pull request #167 from AbdelStark/issue-145-evidence-bundles #273
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| UV_LOCKED: "true" | |
| PYTHON_VERSION: "3.13" | |
| jobs: | |
| quality: | |
| name: Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "0.9.18" | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| - name: Verify lockfile | |
| run: uv lock --check | |
| - name: Install development environment | |
| run: uv sync --group dev | |
| - name: Lint | |
| run: uv run ruff check src tests examples scripts | |
| - name: Check formatting | |
| run: uv run ruff format --check src tests examples scripts | |
| - name: Check docs | |
| run: | | |
| uv run python scripts/generate_provider_docs.py --check | |
| uv run mkdocs build --strict | |
| - name: Run tests with coverage | |
| run: uv run --extra harness pytest --cov=src/worldforge --cov-report=term-missing --cov-fail-under=90 | |
| tests: | |
| name: Tests (py3.13) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "0.9.18" | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| - name: Install development environment | |
| run: uv sync --group dev | |
| - name: Run tests | |
| run: uv run pytest | |
| package: | |
| name: Package contract | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "0.9.18" | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| - name: Validate built package | |
| run: bash scripts/test_package.sh |