-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add code coverage to CI * Use coverage.py for generating coverage report * Trial: use "Cython" with a capital C * Add Cython linetracing in CI * Use scip.pxi file to avoid coverage error when using pyx * Separate test coverage into its own CI workflow * Rename test coverage job * Add comment to make it clear why redirection to .pxi is needed * Remove unneeded packages * Trial: add back cython install
- Loading branch information
Showing
7 changed files
with
5,096 additions
and
5,039 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[run] | ||
plugins = Cython.Coverage | ||
#source = src/pyscipopt | ||
#omit = | ||
# tests | ||
# *__init__.py | ||
source = src/pyscipopt | ||
omit = | ||
tests | ||
__init__.py | ||
scip.pyx |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Run tests with coverage | ||
env: | ||
version: 8.0.3 | ||
|
||
# runs on branches and pull requests; doesn't run on tags. | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
|
||
jobs: | ||
|
||
test-coverage: | ||
runs-on: ubuntu-20.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://scipopt.org/download/release/SCIPOptSuite-${{ env.version }}-Linux-ubuntu.deb | ||
sudo apt-get update && sudo apt install -y ./SCIPOptSuite-${{ env.version }}-Linux-ubuntu.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 | ||
- name: Install PySCIPOpt | ||
run: python -m pip install . | ||
|
||
- name: Run pyscipopt tests | ||
run: | | ||
coverage run -m pytest | ||
coverage report -m | ||
coverage xml | ||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
fail_ci_if_error: true |
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
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
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
Oops, something went wrong.