Skip to content

Commit

Permalink
revert ci config - only remove esmpy in names of env to build
Browse files Browse the repository at this point in the history
  • Loading branch information
aulemahal committed Feb 7, 2024
1 parent a7e0b8a commit c733092
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ jobs:
python -m tox -e lint
test-pypi:
name: Test with Python${{ matrix.python-version }} (PyPI/tox, no ESMF)
name: Test with Python${{ matrix.python-version }} (PyPI/tox)
needs: lint
runs-on: ubuntu-latest
env:
COVERALLS_PARALLEL: true
COVERALLS_SERVICE_NAME: github
esmf-version: 8.4.2
strategy:
matrix:
include:
Expand All @@ -68,7 +69,7 @@ jobs:
- python-version: "3.11"
tox-build: "py311-coveralls"
# - python-version: "3.12"
# tox-build: "py312-coveralls"
# tox-build: "py312-esmpy-coveralls"
defaults:
run:
shell: bash -l {0}
Expand All @@ -78,17 +79,21 @@ jobs:
with:
egress-policy: audit
- uses: actions/[email protected]
- name: Set up Python${{ matrix.python-version }}
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- name: Setup Conda (Micromamba) with Python ${{ matrix.python-version }}
uses: mamba-org/setup-[email protected].0
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install tox~=4.0
cache-downloads: true
environment-name: xscen-pypi
create-args: >-
esmf=${{ env.esmf-version }}
mamba
python=${{ matrix.python-version }}
tox
- name: Test with tox
run: |
python -m tox -e ${{ matrix.tox-build }}
env:
ESMF_VERSION: ${{ env.esmf-version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: run-Python${{ matrix.python-version }}

Expand Down Expand Up @@ -142,10 +147,6 @@ jobs:
create-args: >-
mamba
python=${{ matrix.python-version }}
- name: Downgrade intake-esm
if: matrix.python-version == '3.9'
run: |
micromamba install -y -c conda-forge intake-esm=2023.11.10
- name: Conda and Mamba versions
run: |
mamba --version
Expand Down
13 changes: 12 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,30 @@ commands =
pytest --xdoctest xscen --durations=10 {posargs}

[testenv]
description = Run tests with pytest under {basepython} (PyPI only)
description = Run tests with pytest under {basepython} (Anaconda distribution)
setenv =
COV_CORE_SOURCE =
PYTEST_ADDOPTS = --color=yes --cov=xscen --strict-markers --verbose
PYTHONPATH = {toxinidir}
passenv =
COVERALLS_*
ESMFMKFILE
ESMF_VERSION
GITHUB_*
download = true
deps =
coveralls: coveralls
esmpy: git+https://github.com/esmf-org/esmf.git@v{env:ESMF_VERSION}\#subdirectory=src/addon/esmpy
extras =
dev
conda_channels =
conda-forge
defaults
conda_deps =
pytest
pytest-cov
xdoctest
conda_env = environment.yml
install_command = python -m pip install --no-user {opts} {packages}
commands_pre =
pip list
Expand Down

0 comments on commit c733092

Please sign in to comment.