This repository was archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
51 lines (48 loc) · 1.58 KB
/
Copy pathrun_python_tests.yml
File metadata and controls
51 lines (48 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Python tests
on:
push:
schedule:
- cron: "0 6,18 * * *"
release:
types: [released]
jobs:
run_python_tests:
name: ${{ matrix.os }} w/ Py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.7"]
#os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
fail-fast: false
steps:
- name: Setup Python ${{ matrix.python-version }} env
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Ensure latest pip & wheel
run: "python -m pip install --upgrade pip"
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.9
with:
cmake-version: '3.16.x'
- name: Install PyTorch
# Need to explicitly ask for non-CUDA version on Linux.
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
pip install torch==1.9.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install numpy pytest-forked gym
else
pip install torch numpy pytest-forked gym
fi
shell: bash
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install moolib
# pip installing makes site-packages not be part of sys.path,
# so torch won't be found by our cmake check. TODO: Fix.
# run: "USE_CUDA=0 pip install ."
run: "USE_CUDA=0 python setup.py install"
- name: Run tests
run: "python -um pytest -svx --forked test/unit test/integration"