| 1 |
name: Testing |
| 2 |
|
| 3 |
on: [push, pull_request, workflow_dispatch] |
| 4 |
|
| 5 |
jobs: |
| 6 |
test: |
| 7 |
name: ${{ matrix.name }} |
| 8 |
runs-on: ${{ matrix.os }} |
| 9 |
strategy: |
| 10 |
fail-fast: false |
| 11 |
matrix: |
| 12 |
include: |
| 13 |
- name: latest supported versions |
| 14 |
os: ubuntu-latest |
| 15 |
python-version: '3.12' |
| 16 |
toxenv: py312-test-all-latest-cov |
| 17 |
- name: oldest supported versions |
| 18 |
os: ubuntu-20.04 |
| 19 |
python-version: '3.8' |
| 20 |
toxenv: py38-test-oldest |
| 21 |
- name: macOS 12 |
| 22 |
os: macos-12 |
| 23 |
label: osx-64 |
| 24 |
python-version: '3.10' |
| 25 |
miniconda-version: "latest" |
| 26 |
toxenv: py310-test-latest |
| 27 |
# - name: macOS 13 |
| 28 |
# os: macos-13 |
| 29 |
# label: osx-64 |
| 30 |
# python-version: '3.12' |
| 31 |
# miniconda-version: "latest" |
| 32 |
# toxenv: py312-test-latest |
| 33 |
steps: |
| 34 |
- name: Checkout repository |
| 35 |
uses: actions/checkout@v4 |
| 36 |
- name: Install Conda w/ Python ${{ matrix.python-version }} |
| 37 |
uses: conda-incubator/setup-miniconda@v2 |
| 38 |
with: |
| 39 |
auto-activate-base: false |
| 40 |
python-version: ${{ matrix.python-version }} |
| 41 |
channels: conda-forge |
| 42 |
- name: Install Dependencies |
| 43 |
shell: bash -el {0} |
| 44 |
run: | |
| 45 |
pip install tox-conda |
| 46 |
- name: Set env variables for macOS |
| 47 |
if: matrix.label == 'osx-64' |
| 48 |
run: | |
| 49 |
echo "DYLD_FALLBACK_LIBRARY_PATH=${CONDA_PREFIX}/lib" >> $GITHUB_ENV |
| 50 |
SDKROOT=$(xcrun --sdk macosx --show-sdk-path) |
| 51 |
echo "SDKROOT: ${SDKROOT}" |
| 52 |
echo "SDKROOT=${SDKROOT}" >> $GITHUB_ENV |
| 53 |
echo "CONDA_BUILD_SYSROOT=${SDKROOT}" >> $GITHUB_ENV |
| 54 |
export CFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include" |
| 55 |
export LDFLAGS="-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" |
| 56 |
- name: Run tests |
| 57 |
shell: bash -el {0} |
| 58 |
run: | |
| 59 |
tox -e ${{ matrix.toxenv }} ${{ matrix.toxargs }} -- ${{ matrix.toxposargs }} |