Merge branch 'main' of github.com:D3M-Research-Group/odtlearn #186
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: Run Python Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
PMIP_CBC_LIBRARY: "/home/runner/build/dist/lib/libCbc.so" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9.x' | |
- name: Install dependencies | |
run: | | |
# python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Compile CBC binary | |
run : | | |
sudo apt-get install gcc g++ gfortran libgfortran-9-dev liblapack-dev libamd2 libcholmod3 libmetis-dev libsuitesparse-dev libnauty2-dev git | |
mkdir -p ~/build | |
cd ~/build | |
wget -nH https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew | |
bash coinbrew fetch Cbc@master --no-prompt --skip-update | |
bash coinbrew build Cbc@stable/2.10 --no-prompt --tests=none | |
- name: Run tests with pytest | |
run: | | |
cd odtlearn/tests | |
pytest -v |