Skip to content

Commit

Permalink
Add a github action that runs the CI python unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Jan 25, 2022
1 parent 3b23521 commit a6a95bd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/python_unittests.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .travis-ci.d/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a6a95bd

Please sign in to comment.