chore: Add a schema compatibility check to the CI for the OH CLI #1618
Workflow file for this run
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: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| pre-commit: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.14 | |
| - name: Install Ariadne-codegen | |
| run: pip install ariadne-codegen | |
| - uses: pre-commit/action@v3.0.1 | |
| test: | |
| name: Run test suite | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [ "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: "Install dependencies" | |
| run: pip install ".[dev]" | |
| - name: Run tests | |
| run: pytest --cov=. --cov-report html --cov-report term --cov-fail-under=25 | |
| schema-compatibility: | |
| name: Check schema compatibility with demo server | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: pip install ".[dev]" | |
| - name: Check schema compatibility | |
| run: python scripts/check_schema_compatibility.py | |
| conda-build: | |
| name: Conda build check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Miniconda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-activate-base: true | |
| activate-environment: true | |
| python-version: 3.13 | |
| - name: Install conda tools | |
| run: conda install -y conda-build anaconda-client | |
| - name: Extract version from pyproject.toml | |
| id: extract_version | |
| working-directory: . | |
| run: | | |
| VERSION=$(awk -F\" '/^version =/ { print $2; exit }' pyproject.toml) | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "Extracted version: $VERSION" | |
| - name: Dry-run conda build | |
| shell: bash -l {0} | |
| working-directory: recipe | |
| env: | |
| VERSION: ${{ env.VERSION }} | |
| run: | | |
| conda build . --channel conda-forge --channel bioconda |