Skip to content

Commit

Permalink
Update CI workflows per iiasa/ixmp#435, iiasa/message_ix#557
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Feb 23, 2022
1 parent 133ba47 commit 53ea02e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 24 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ jobs:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
# Uncomment and set equal to the "latest version testable on GitHub
# Actions" per pytest.yaml, if different from the default version used by
# setup-python.
with:
python-version: "3.9"
# This should match the "Latest version testable on GitHub Actions"
# in pytest.yaml
# with:
# python-version: "3.10"

- name: Cache Python packages
uses: actions/cache@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
twine check dist/*
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.4.1
uses: pypa/gh-action-pypi-publish@v1.5.0
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
user: __token__
password: ${{ secrets.TESTPYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.1
uses: pypa/gh-action-pypi-publish@v1.5.0
if: github.event_name == 'release'
with:
user: __token__
Expand Down
29 changes: 12 additions & 17 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ jobs:
pytest:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
python-version:
# Latest version testable on GitHub Actions. This should match the
# version used in the 'pytest' workflows of both ixmp and message_ix.
- "3.9"
include:
# One job per OS; latest python version testable on GitHub actions.
# These should match the versions used in the "pytest" workflows of both
# ixmp and message_ix.
- os: macos-latest
python-version: "3.10"
- os: ubuntu-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.9"

fail-fast: false

Expand Down Expand Up @@ -72,14 +74,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Use OpenJDK 14 (macOS only)
# Using the default OpenJDK 1.8 on the macos-latest runner produces
# "Abort trap: 6" when JPype1 starts the JVM
if: ${{ startsWith(matrix.os, 'macos') }}
uses: actions/setup-java@v1
with:
java-version: '14'

- name: Cache Python packages and GAMS installer
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -116,6 +110,7 @@ jobs:
run: make --directory=message-ix-models/doc html

- name: Upload test coverage to Codecov.io
uses: codecov/codecov-action@v1.2.1
uses: codecov/codecov-action@v2
with:
directory: message-ix-models
root_dir: message-ix-models

0 comments on commit 53ea02e

Please sign in to comment.