Skip to content

demo out-of-sync

demo out-of-sync #3086

name: Python Unittests
on:
push:
branches:
- main
pull_request:
jobs:
unittest:
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", 3.11]
platform: ["linux.20_04.4x"]
include:
- python-version: 3.9
platform: macos-12-xl
fail-fast: false
env:
OS: ${{ matrix.platform }}
PYTHON: ${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
steps:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Checkout TorchX
uses: actions/checkout@v2
- name: Install dependencies
run: |
set -eux
pip install pytest pytest-cov
# use legacy resolver for python 3.11, otherwise pip will timeout trying to resolve deps
# TODO(kiukchung) long term we should narrowly scope dependency versions
# see: https://pip.pypa.io/en/latest/topics/dependency-resolution/
pip install --use-deprecated=legacy-resolver -e .[dev]
- name: Run tests
run: pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
files: ./coverage.xml,!./cache
flags: unittests
verbose: true