From a6a95bda5132b1d371de303371aab74e8118299b Mon Sep 17 00:00:00 2001 From: tmadlener Date: Fri, 26 Feb 2021 14:05:19 +0100 Subject: [PATCH] Add a github action that runs the CI python unittests --- .github/workflows/python_unittests.yml | 29 ++++++++++++++++++++++++++ .travis-ci.d/requirements.txt | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/python_unittests.yml diff --git a/.github/workflows/python_unittests.yml b/.github/workflows/python_unittests.yml new file mode 100644 index 00000000..c07764f0 --- /dev/null +++ b/.github/workflows/python_unittests.yml @@ -0,0 +1,29 @@ +name: build + +on: [push, pull_request] + +jobs: + python-unittest: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + py_version: ['2.7.x', '3.7'] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.py_version }} + - name: Install requirements + run: pip install -r ${GITHUB_WORKSPACE}/.travis-ci.d/requirements.txt + - name: Run python unit tests + env: + GITHUB_TOKEN: ${{ secrets.COVERALLS_TOKEN }} + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} + run: | + export PYTHONPATH=${GITHUB_WORKSPACE}:${PYTHONPATH} + echo $PYTHONPATH + source ${GITHUB_WORKSPACE}/.travis-ci.d/set-reportstyle.sh + export PYTEST_ADDOPTS=$PYTEST_ADDOPTS" -m 'not integration'" + py.test + coveralls diff --git a/.travis-ci.d/requirements.txt b/.travis-ci.d/requirements.txt index 70083b47..ac7ab1bb 100644 --- a/.travis-ci.d/requirements.txt +++ b/.travis-ci.d/requirements.txt @@ -7,5 +7,5 @@ pylint>=1.4.4 pytest>=4.6 pytest-cov>=2.2.0 coverage>=4.0.3 -python-coveralls +coveralls ipython==5.3.0