Skip to content

Commit

Permalink
Use non-ARM64 due to failing MacOS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann committed Apr 25, 2024
1 parent 062e8bb commit 4f92342
Showing 1 changed file with 50 additions and 50 deletions.
100 changes: 50 additions & 50 deletions .github/workflows/pytest.yml
Expand Up @@ -14,16 +14,16 @@ jobs:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
- ubuntu-latest
- windows-latest
- macos-latest-large # use non-Arm64 version for now due to failing numpy
python-version:
- '3.10'
- '3.11'
- '3.12'
- '3.10'
- '3.11'
- '3.12'

fail-fast: false

defaults:
run:
shell: bash
Expand All @@ -32,52 +32,52 @@ jobs:
name: ${{ matrix.os }} py${{ matrix.python-version }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

#------------------------------
# install & configure poetry
#------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
#------------------------------
# install & configure poetry
#------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

#------------------------------------
# load cached venv if cache exists
#------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#------------------------
# install your project
#------------------------
- name: Install library
run: poetry install --no-interaction --with dev,optional_io_formats,optional_plotting,tutorials,wbdata
#------------------------------------
# load cached venv if cache exists
#------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#------------------------
# install your project
#------------------------
- name: Install library
run: poetry install --no-interaction --with dev,optional_io_formats,optional_plotting,tutorials,wbdata

# run tests without Matplotlib & CodeCode tests on earlier Python versions
- name: Test with pytest
if: ${{ matrix.python-version != '3.12' }}
run: poetry run pytest tests
# run tests without Matplotlib & CodeCode tests on earlier Python versions
- name: Test with pytest
if: ${{ matrix.python-version != '3.12' }}
run: poetry run pytest tests

# run tests with Matplotlib & CodeCov on latest Python version
- name: Test with pytest including Matplotlib & Codecov
if: ${{ matrix.python-version == '3.12' }}
run: poetry run pytest tests --mpl --cov=./ --cov-report=xml
# run tests with Matplotlib & CodeCov on latest Python version
- name: Test with pytest including Matplotlib & Codecov
if: ${{ matrix.python-version == '3.12' }}
run: poetry run pytest tests --mpl --cov=./ --cov-report=xml

- name: Upload coverage report to Codecov
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' }}
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
env_vars: ${{ matrix.os }} py${{ matrix.python-version }}
- name: Upload coverage report to Codecov
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' }}
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
env_vars: ${{ matrix.os }} py${{ matrix.python-version }}

0 comments on commit 4f92342

Please sign in to comment.