Skip to content

Remove uv commands from Makefile #2450

Remove uv commands from Makefile

Remove uv commands from Makefile #2450

Workflow file for this run

name: GitHub CI
# Execute this for every push
on: [push]
# Use bash explicitly for being able to enter the conda environment
defaults:
run:
shell: bash -el {0}
env:
CLIMADA_DATA_DOI: 10.5281/zenodo.20595842
jobs:
integration-test:
name: 'Core / Integration Test Pipeline'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
-
name: Checkout Repo
uses: actions/checkout@v4
# --- Modify paths in climada.conf ---
-
name: Write climada.conf system data
uses: amochkin/action-json@v1
with:
mode: write
file: climada.conf
property: local_data.system
value: ${{ github.workspace }}/climada/data
-
name: Write climada.conf demo data
uses: amochkin/action-json@v1
with:
mode: write
file: climada.conf
property: local_data.demo
value: ${{ github.workspace }}/climada/demo
-
run: |
cat climada.conf
# ---
-
name: Install make
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: make
-
name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: "3.12"
cache-suffix: integrationtest
-
name: Install dependencies
run: |
uv sync --locked --dev
-
name: Cache data
uses: actions/cache@v5
with:
path: climada.zip
key: ${{ env.CLIMADA_DATA_DOI }}
-
name: Download and unzip data
run: |
uvx zenodo_get ${{ env.CLIMADA_DATA_DOI }}
unzip -o climada.zip -d ${{ github.workspace }}
-
name: Run Integration Tests
run: |
uv run -- make integ_test
build-and-test:
name: 'Core / Unit Test Pipeline'
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
# For publishing results
checks: write
# Run this test for different Python versions
strategy:
# Do not abort other tests if only a single one fails
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
-
name: Checkout Repo
uses: actions/checkout@v4
-
# Store the current date to use it as cache key for the environment
name: Get current date
id: date
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
-
name: Install make
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: make
-
name: Install Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
-
name: Install dependencies
run: |
pip install --upgrade pip
pip install -e ./
pip install --group dev
-
name: Run Unit Tests
run: |
make unit_test
-
name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: tests_xml/tests.xml
check_name: "Core / Unit Test Results (${{ matrix.python-version }})"
comment_mode: "off"
-
name: Upload Coverage Reports
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report-core-unittests-py${{ matrix.python-version }}
path: coverage/
test-petals:
name: Petals Compatibility
uses: CLIMADA-project/climada_petals/.github/workflows/testing.yml@develop
needs: build-and-test
with:
core_branch: ${{ github.ref }}
petals_branch: develop
permissions:
checks: write