Feature: MatrixVariable supports numpy broadcast feature
#1082
Workflow file for this run
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 | |
| if python -m pip help install | grep -q -- '--group'; then | |
| python -m pip install --group coverage | |
| else | |
| python -m pip install networkx cython pytest-cov numpy | |
| fi | |
| - 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 | |
| if python -m pip help install | grep -q -- '--group'; then | |
| coverage run -m pytest -nauto | |
| coverage combine | |
| else | |
| coverage run -m pytest | |
| fi | |
| coverage report -m | |
| coverage xml | |
| - name: Upload to codecov.io | |
| uses: codecov/codecov-action@v2 | |
| with: | |
| fail_ci_if_error: false |