parent
3fa0150dd9
commit
272eb647fd
@ -1,18 +0,0 @@
|
|||||||
name: Test
|
|
||||||
on: push
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: self-hosted
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: Run tests
|
|
||||||
run: |
|
|
||||||
rm -rf ~/.conda/envs/miplearn-test
|
|
||||||
yes | conda create --name miplearn-test python=3.6
|
|
||||||
(cd /opt/gurobi900/linux64 && ~/.conda/envs/miplearn-test/bin/python setup.py install)
|
|
||||||
(cd /opt/cplex-12.8/cplex/python/3.6/x86-64_linux && ~/.conda/envs/miplearn-test/bin/python setup.py install)
|
|
||||||
make install test \
|
|
||||||
PYTHON=~/.conda/envs/miplearn-test/bin/python \
|
|
||||||
PIP=~/.conda/envs/miplearn-test/bin/pip3 \
|
|
||||||
PYTEST=~/.conda/envs/miplearn-test/bin/pytest
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
name: Test
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: [3.6, 3.7, 3.8]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out source code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install -i https://pypi.gurobi.com gurobipy
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
- name: Test with pytest
|
||||||
|
run: |
|
||||||
|
pytest
|
Loading…
Reference in new issue