Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI github actions workflow #1034

Open
wants to merge 42 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
bebdd49
Add CI github actions workflow
sethaxen Oct 21, 2020
3b7544f
Correctly reference environmental variable
sethaxen Oct 21, 2020
a846c35
Fix boost package name
sethaxen Oct 21, 2020
46f9023
Use same form of setup
sethaxen Oct 21, 2020
10c5ec0
Remove regex arg to ctest
sethaxen Oct 21, 2020
c5a84f0
Make ctest output on failure
sethaxen Oct 21, 2020
0a3dfe1
Install more dependencies
sethaxen Oct 21, 2020
f102355
Make build directory in imp directory
sethaxen Oct 21, 2020
d2b07cc
Replace ctest with nosetests
sethaxen Oct 21, 2020
b18174a
Don't run codecov action verbosely
sethaxen Oct 21, 2020
37f4121
Fix package name
sethaxen Oct 21, 2020
e8272d6
Execute from build directory
sethaxen Oct 21, 2020
15ba0e7
Add nose as dependency
sethaxen Oct 22, 2020
28d19b9
Change comment indentation
sethaxen Oct 22, 2020
c875f3a
Create test directory
sethaxen Nov 9, 2020
1b1a065
Don't install both Python 2 and 3
sethaxen Nov 9, 2020
53c0161
Remove extraneous python install step
sethaxen Nov 9, 2020
c3d942e
Install codecov
sethaxen Nov 9, 2020
232dfcd
Fix check for Python 2 env
benmwebb Dec 23, 2020
cefd848
Set correct Python 3 version
benmwebb Dec 23, 2020
844eb15
Use correct pip binary
benmwebb Dec 23, 2020
0554bd9
Use correct nosetests
benmwebb Dec 23, 2020
c2d0e0c
Help CMake to find CGAL
benmwebb Dec 23, 2020
000ee17
Run just IMP.kernel tests for now
benmwebb Dec 23, 2020
ca909b7
Add missing "then" to if statement
benmwebb Dec 23, 2020
6569ce8
Merge branch 'develop' into githubactionsci
sethaxen Jan 5, 2021
b101763
Add coverage module
sethaxen Jan 9, 2021
3cd828b
Remove duplicated Python package installation
sethaxen Jan 9, 2021
d4e40a6
Compile only a few modules for faster iteration
sethaxen Jan 10, 2021
0b376a0
Only test kernel for now
sethaxen Jan 10, 2021
c677c62
Use pytest instead of nose
benmwebb Jan 14, 2021
4334497
There are no "medium" tests in IMP.kernel
benmwebb Jan 14, 2021
ef05987
Run each test in a separate process
benmwebb Jan 14, 2021
02c3de0
Many kernel tests use IMP.core/algebra classes
benmwebb Jan 14, 2021
bbe1122
Don't cancel others if one build fails
benmwebb Jan 14, 2021
e4b18c1
Use older py.test binary
benmwebb Jan 14, 2021
a75a4af
Run test via unittest
benmwebb Jan 14, 2021
6018f19
Install .deb packages for pytest, not pip
benmwebb Jan 14, 2021
4039666
Need IMP.container to run some kernel tests
benmwebb Jan 14, 2021
ecc8e65
Fix pytest name
benmwebb Jan 14, 2021
1db30a4
Increase fetch-depth
sethaxen Jan 14, 2021
8ffe8da
Explicitly output xml coverage report
sethaxen Jan 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 35 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: CI
on: [push, pull_request]
on:
push:
branches: [develop]
pull_request:

env:
CXXFLAGS: "-fprofile-arcs -ftest-coverage"
Expand All @@ -9,31 +12,38 @@ jobs:
name: "Python ${{ matrix.python-version }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.6"]
os: [ubuntu-18.04]
compiler: [gcc]
env:
CC: ${{ matrix.compiler }}
PY2: ${{ startsWith(matrix.python-version, 2) && 'on' || 'off' }}
BUILD: "-j 2 IMP.kernel IMP.test IMP.core IMP.algebra IMP.container"
PERCPP: "kernel"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq libboost-all-dev swig libhdf5-serial-dev libeigen3-dev \
cmake libcgal-dev libcgal-qt5-dev \
libfftw3-dev libopencv-dev libgsl0-dev libann-dev \
libprotobuf-dev protobuf-compiler \
libopenmpi-dev
cmake libcgal-dev libcgal-qt5-dev libfftw3-dev libopencv-dev libgsl0-dev \
libann-dev libprotobuf-dev protobuf-compiler libopenmpi-dev
if [ "${{ env.PY2 }}" == "on" ]
then
sudo apt-get install -qq python-dev python-numpy python-protobuf \
python-nose python-pip python-biopython
python-coverage python-pip \
python-biopython python-pytest-xdist \
python-pytest-cov
export PIP=pip2
else
sudo apt-get install -qq python3-dev python3-numpy python3-protobuf \
python3-nose python3-pip python3-biopython
python3-coverage python3-pip \
python3-biopython python3-pytest-xdist \
python3-pytest-cov
export PIP=pip3
fi
$PIP install codecov
Expand All @@ -43,5 +53,21 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DUSE_PYTHON2=${{ env.PY2 }} -DCMAKE_CXX_FLAGS="${{ env.CXXFLAGS }}" -DCGAL_DIR=/usr/lib/x86_64-linux-gnu/cmake/CGAL/
make -k -j 2
cmake .. -DUSE_PYTHON2=${{ env.PY2 }} -DCMAKE_CXX_FLAGS="${{ env.CXXFLAGS }}" \
-DCGAL_DIR=/usr/lib/x86_64-linux-gnu/cmake/CGAL/ \
-DIMP_PER_CPP_COMPILATION=${{ env.PERCPP }}
make -k ${{ env.BUILD }}
- name: Run tests
run: |
if [ "${{ env.PY2 }}" == "on" ]; then
export PYTEST=pytest
else
export PYTEST=pytest-3
fi
cd build
./setup_environment.sh $PYTEST --cov=.. --cov-report=xml --cov-branch --forked ../modules/kernel/test/test_*.py
- name: Upload coverage to Codecov
sethaxen marked this conversation as resolved.
Show resolved Hide resolved
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false
directory: build
25 changes: 16 additions & 9 deletions modules/kernel/test/test_progress.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import IMP
import IMP.test
import sys

IMP.set_deprecation_exceptions(True)

IMP.setup_from_argv(sys.argv, "Test progress bar")
IMP.set_log_level(IMP.PROGRESS)
IMP.set_progress_display("Test progress", 110)
for i in range(0, 110, 5):
IMP.add_to_progress_display(5)
class Tests(IMP.test.TestCase):

IMP.set_progress_display("Test progress round 2", 130)
for i in range(0, 130, 5):
IMP.add_to_progress_display(5)
def test_progress(self):
"""Test progress bar"""
IMP.set_log_level(IMP.PROGRESS)
IMP.set_progress_display("Test progress", 110)
for i in range(0, 110, 5):
IMP.add_to_progress_display(5)

IMP.set_progress_display("Test progress round 2", 130)
for i in range(0, 130, 5):
IMP.add_to_progress_display(5)


if __name__ == '__main__':
IMP.test.main()

Check warning on line 21 in modules/kernel/test/test_progress.py

View check run for this annotation

Codecov / codecov/patch

modules/kernel/test/test_progress.py#L21

Added line #L21 was not covered by tests