introduce img_root_secondary to torchx macros #3651
Workflow file for this run
This file contains hidden or 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.9, "3.10", 3.11, 3.12] | |
platform: [linux.24_04.4x] | |
include: | |
- python-version: 3.12 | |
platform: macos-13-xlarge | |
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: Pin pip-25.0.1 | |
run: | | |
set -eux | |
# required since pip-25.1 breaks a few old deps in dev-requirements.txt | |
# (upgrading those will take some time) | |
# see: https://pip.pypa.io/en/stable/news/#v25-1 | |
python -m pip install pip==25.0.1 | |
pip --version | |
- 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 |