Feature/docathon update clean #51
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: Internal CI | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| tags-ignore: | |
| - '**' | |
| paths-ignore: | |
| - "README.md" | |
| - "LICENCE" | |
| - ".gitignore" | |
| pull_request: | |
| branches: | |
| - develop | |
| workflow_call: | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: "Branch to deploy from" | |
| required: true | |
| default: "main" | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| jobs: | |
| combine-environments: | |
| name: Run internal CI (Combine environments and verify package installation) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - name: Install conda-merge | |
| run: | | |
| python -m pip install conda-merge | |
| - name: Combine environments | |
| run: conda-merge ci/environment-ci.yml environment.yml > ci/combined-environment.yml | |
| - name: Get current date | |
| id: date | |
| run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" | |
| - uses: mamba-org/setup-micromamba@v1 | |
| with: | |
| environment-file: ci/combined-environment.yml | |
| environment-name: INSTALL-CHECK | |
| cache-environment: true | |
| cache-environment-key: environment-${{ steps.date.outputs.date }} | |
| cache-downloads-key: downloads-${{ steps.date.outputs.date }} | |
| create-args: >- | |
| python=3.13 | |
| - name: Install package | |
| run: | | |
| python -m pip install --no-deps -e . | |
| - name: Verify package import | |
| run: | | |
| python -c "import earthkit.transforms; print('✅ Package import OK')" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: combined-environments | |
| path: ci/combined-environment.yml | |
| unit-tests: | |
| name: unit-tests | |
| needs: combine-environments | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: combined-environments | |
| path: ci | |
| - name: Get current date | |
| id: date | |
| run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" | |
| - uses: mamba-org/setup-micromamba@v1 | |
| with: | |
| environment-file: ci/combined-environment.yml | |
| environment-name: DEVELOP | |
| cache-environment: true | |
| cache-environment-key: environment-${{ steps.date.outputs.date }} | |
| cache-downloads-key: downloads-${{ steps.date.outputs.date }} | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| - name: Install package | |
| run: | | |
| python -m pip install -e ".[all]" | |
| - name: Run tests | |
| run: | | |
| make unit-tests COV_REPORT=xml | |
| legacy-api-unit-tests: | |
| name: legacy-api-unit-tests | |
| needs: combine-environments | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: combined-environments | |
| path: ci | |
| - name: Get current date | |
| id: date | |
| run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" | |
| - uses: mamba-org/setup-micromamba@v1 | |
| with: | |
| environment-file: ci/combined-environment.yml | |
| environment-name: DEVELOP | |
| cache-environment: true | |
| cache-environment-key: environment-${{ steps.date.outputs.date }} | |
| cache-downloads-key: downloads-${{ steps.date.outputs.date }} | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| - name: Install package | |
| run: | | |
| python -m pip install -e ".[all]" | |
| - name: Run legacy API tests | |
| run: | | |
| make legacy-api-unit-tests COV_REPORT=xml | |
| type-check: | |
| needs: combine-environments | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: combined-environments | |
| path: ci | |
| - name: Get current date | |
| id: date | |
| run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" | |
| - uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-file: ci/combined-environment.yml | |
| environment-name: DEVELOP | |
| cache-environment: true | |
| cache-environment-key: environment-${{ steps.date.outputs.date }} | |
| cache-downloads-key: downloads-${{ steps.date.outputs.date }} | |
| create-args: >- | |
| python=3.13 | |
| - name: Install package | |
| run: | | |
| python -m pip install -e ".[all]" | |
| - name: Run code quality checks | |
| run: | | |
| make type-check | |
| docs-build: | |
| needs: combine-environments | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: combined-environments | |
| path: ci | |
| - name: Get current date | |
| id: date | |
| run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" | |
| - uses: mamba-org/setup-micromamba@v1 | |
| with: | |
| environment-file: ci/combined-environment.yml | |
| environment-name: DEVELOP | |
| cache-environment: true | |
| cache-environment-key: environment-${{ steps.date.outputs.date }} | |
| cache-downloads-key: downloads-${{ steps.date.outputs.date }} | |
| create-args: >- | |
| python=3.13 | |
| - name: Install package | |
| run: | | |
| python -m pip install -e ".[docs]" | |
| - name: Register Jupyter kernel | |
| run: | | |
| python -m ipykernel install --user --name=python3 | |
| - name: Build documentation | |
| run: | | |
| make docs-build |