made test executable #7
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, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
python-version: | |
- 3.7 | |
- 3.8 | |
- 3.9 | |
- 3.10 | |
- 3.11 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup | |
uses: actions/setup-python@v1 | |
- name: Cache pip | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install dependencies for Windows | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
pip install torch==1.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html | |
- name: Install dependencies for macOS | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: | | |
brew install libomp | |
- name: Install packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install numpy Cython pytest-cov gym==0.17.2 flask onnxruntime stable-baselines3 | |
- name: Build Cython | |
run: | | |
pip install -U protobuf==3.20.1 # temporarily dependency fix | |
pip install numpy # temporarily dependency fix | |
pip install -e . | |
python setup.py build_ext --inplace --define CYTHON_TRACE | |
- name: Unit tests | |
run: | | |
mkdir -p test_data | |
pytest --cov-report=xml --cov-config=.coveragerc tests -p no:warnings -v |