Skip to content

Fix version-specific bugs #121

Fix version-specific bugs

Fix version-specific bugs #121

Workflow file for this run

name: Tests
on:
push:
branches:
- main
- master
paths-ignore:
- "doc*/**"
- "**/*.md"
- "**/*.rst"
pull_request:
paths-ignore:
- "doc*/**"
- "**/*.md"
- "**/*.rst"
workflow_dispatch:
jobs:
python:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
# PyTorch does not support Python 3.11 on non-Linux platforms
# see: https://github.com/pytorch/pytorch/issues/86566
exclude:
- os: macos-latest
python-version: "3.11"
- os: windows-latest
python-version: "3.11"
defaults:
run:
shell: ${{ contains(matrix.os, 'windows') && 'powershell' || 'bash {0}' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install tox
- name: Test Python API
run: tox -e py
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
with:
files: ./coverage.xml # optional