Adding Override Option for TorchX Role #3247
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
env_vars: OS,PYTHON | |
files: ./coverage.xml,!./cache | |
flags: unittests | |
verbose: true |