Add getNBranchings and getNBranchingsCurrentRun #941
This file contains hidden or 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 tests with coverage | |
env: | |
version: 9.2.1 | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
branches: | |
- 'master' | |
jobs: | |
test-coverage: | |
if: (github.event_name != 'pull_request') || (github.event.pull_request.draft == false) | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies (SCIPOptSuite) | |
run: | | |
wget --quiet --no-check-certificate https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb | |
sudo apt-get update && sudo apt install -y ./SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb | |
- name: Setup python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Prepare python environment | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install networkx cython pytest-cov numpy | |
- name: Install PySCIPOpt | |
run: | | |
export CFLAGS="-O0 -ggdb -Wall -Wextra -Werror" # Debug mode. More warnings. Warnings as errors. | |
python -m pip install . -v 2>&1 | tee build.log | |
grep -i "warning" build.log || true | |
- name: Run pyscipopt tests | |
run: | | |
sudo apt-get install tzdata locales -y && sudo locale-gen pt_PT && sudo update-locale # add pt_PT locale that is used in tests | |
coverage run -m pytest | |
coverage report -m | |
coverage xml | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v2 | |
with: | |
fail_ci_if_error: false |