Skip to content

docker: Upgrade pytorch to 2.0 #2627

docker: Upgrade pytorch to 2.0

docker: Upgrade pytorch to 2.0 #2627

name: Python Unittests
on:
push:
branches:
- main
pull_request:
jobs:
unittest:
strategy:
matrix:
python-version: [3.8, 3.9, '3.10']
platform: [ubuntu-20.04]
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
pip install -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
fail_ci_if_error: true
files: ./coverage.xml,!./cache
flags: unittests
verbose: true