Allow JSON encoder to handle ndarray #2922
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: Test | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
pull_request: | |
branches: | |
- main | |
- release/* | |
workflow_call: | |
workflow_dispatch: {} | |
jobs: | |
pytest: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python_version: | |
- "3.9" | |
install_version: | |
- "[all]" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Cache pip | |
uses: actions/cache@v3 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Setup | |
run: | | |
set -ex | |
python -m pip install --upgrade pip wheel | |
python -m pip install -e .${{ matrix.install_version }} | |
- name: Run Tests | |
# TODO: stop using pytest-split and remove low coverage requirement once C++ shared mem impl is done! | |
# Jira link for above: https://mosaicml.atlassian.net/browse/STR-107 | |
id: tests | |
run: | | |
set -ex | |
pytest --splits 11 --group 1 --cov-fail-under=10 | |
pytest --splits 11 --group 2 --cov-fail-under=10 | |
pytest --splits 11 --group 3 --cov-fail-under=10 | |
pytest --splits 11 --group 4 --cov-fail-under=10 | |
pytest --splits 11 --group 5 --cov-fail-under=10 | |
pytest --splits 11 --group 6 --cov-fail-under=10 | |
pytest --splits 11 --group 7 --cov-fail-under=10 | |
pytest --splits 11 --group 8 --cov-fail-under=10 | |
pytest --splits 11 --group 9 --cov-fail-under=10 | |
pytest --splits 11 --group 10 --cov-fail-under=10 | |
pytest --splits 11 --group 11 --cov-fail-under=10 |