Skip to content

Test MESSAGEix-GLOBIOM scenarios #1327

Test MESSAGEix-GLOBIOM scenarios

Test MESSAGEix-GLOBIOM scenarios #1327

Workflow file for this run

name: Test MESSAGEix-GLOBIOM scenarios
# This workflow is a stripped-down version of pytest.yaml, with multi-OS
# features removed.
on:
# Uncomment these two lines for debugging, but leave them commented on 'main'
# pull_request:
# branches: [ main ]
schedule:
# 05:00 UTC = 06:00 CET = 07:00 CEST
- cron: "0 5 * * *"
pull_request_target:
paths:
- '**.gms'
- '**.gpr'
- '**.gdx'
types:
- labeled
env:
# Version used until 2024-11-20; disabled
# GAMS_VERSION: 29.1.0
# First version including a macOS arm64 distribution
GAMS_VERSION: 43.4.1
# See description in lint.yml
depth: 100
jobs:
nightly:
runs-on: ubuntu-latest
steps:
- name: Check out ixmp
uses: actions/checkout@v4
with:
repository: iiasa/ixmp
path: ixmp
fetch-depth: ${{ env.depth }}
- name: Check out message_ix
uses: actions/checkout@v4
with:
path: message_ix
fetch-depth: ${{ env.depth }}
- name: Fetch tags (for setuptools-scm)
run: |
(cd ixmp; git fetch --tags --depth=${{ env.depth }})
(cd message_ix; git fetch --tags --depth=${{ env.depth }})
- uses: actions/setup-python@v5
with:
# If the "Latest version testable on GitHub Actions" in pytest.yaml
# is not the latest 3.x stable version, adjust here to match:
python-version: "3.12"
cache: pip
cache-dependency-path: "**/setup.cfg"
- name: Upgrade pip, setuptools-scm, wheel
run: python -m pip install --upgrade pip setuptools-scm wheel
- name: Cache GAMS installer and Python packages
uses: actions/cache@v4
with:
path: gams
key: ubuntu-latest-gams${{ env.GAMS_VERSION }}
- uses: iiasa/actions/setup-gams@main
with:
version: ${{ env.GAMS_VERSION }}
license: ${{ secrets.GAMS_LICENSE }}
- name: Install Python packages and dependencies
run: |
python -m pip install --upgrade pip wheel setuptools-scm
(cd ixmp; pip install .[tests])
(cd message_ix; pip install .[tests])
# TEMPORARY Work around dask v2024.11.0;
# see https://github.com/khaeru/genno/issues/149
pip install "dask < 2024.11.0"
- name: Run test suite using pytest
env:
MESSAGE_IX_CI_USER: ${{ secrets.ENE_DATA_USER }}
MESSAGE_IX_CI_PW: ${{ secrets.ENE_DATA_PASS }}
working-directory: message_ix
run: pytest message_ix -m nightly -rA --verbose