Skip to content

[pre-commit.ci] pre-commit autoupdate #1059

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #1059

Workflow file for this run

name: test
env:
scip-version: 8.0.0
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:
jobs:
test:
# Only 20.04 is known to work with scip 8.0.0
runs-on: ubuntu-20.04
strategy:
#max-parallel: 10
matrix:
config:
- python: "3.9"
- python: "3.10"
- python: "3.11"
split: [1, 2, 3, 4, 5, 6, 7, 8]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.config.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config.python }}
- name: Install dependencies
run: |
wget --quiet --no-check-certificate https://scipopt.org/download/release/SCIPOptSuite-${{ env.scip-version }}-Linux-ubuntu.deb
sudo apt-get update && sudo apt install -y ./SCIPOptSuite-${{ env.scip-version }}-Linux-ubuntu.deb
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies and package
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-optional.txt
pip install -e .[test]
- name: Test with pytest
run: |
pytest --splits 8 --group ${{ matrix.split }} --durations-path tests/.test_durations tests
- if: ${{ matrix.config.python == '3.11' && github.event_name == 'push' }}
name: codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml