Update earthkit-transforms to use latest version of earthkit-data #83
Workflow file for this run
This file contains 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: on-push | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- uses: pre-commit/[email protected] | |
combine-environments: | |
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: | | |
for SUFFIX in ci integration; do | |
conda-merge ci/environment-$SUFFIX.yml environment.yml > ci/combined-environment-$SUFFIX.yml || exit | |
done | |
- 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'] | |
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-ci.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 --no-deps -e . | |
- name: Run tests | |
run: | | |
make unit-tests COV_REPORT=xml | |
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-ci.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.11 | |
- name: Install package | |
run: | | |
python -m pip install --no-deps -e . | |
- name: Build documentation | |
run: | | |
make docs-build | |
integration-tests: | |
needs: [combine-environments, unit-tests] | |
if: | | |
success() && false | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- python-version: '3.11' | |
extra: -integration | |
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${{ matrix.extra }}.yml | |
environment-name: DEVELOP${{ matrix.extra }} | |
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 --no-deps -e . | |
- name: Run tests | |
run: | | |
make unit-tests COV_REPORT=xml |