diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 6589b677..178e728f 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -3,7 +3,11 @@ name: build -on: [pull_request] +on: + pull_request: + push: + branches: + - master jobs: build: @@ -21,7 +25,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest pytest-cov + pip install flake8 pytest coveralls pip install . if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 @@ -32,11 +36,34 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pytest tests/ --doctest-modules --cov=challengeutils --cov-report=html - - name: Upload pytest test results - uses: actions/upload-artifact@master - with: - name: pytest-results-${{ matrix.python-version }} - path: htmlcov - # Use always() to always run this step to publish test results when there are test failures - if: ${{ always() }} \ No newline at end of file + pytest tests + # - name: Upload pytest test results + # uses: actions/upload-artifact@master + # with: + # name: pytest-results-${{ matrix.python-version }} + # path: htmlcov + # # Use always() to always run this step to publish test results when there are test failures + # if: ${{ always() }} + - name: Prepare environment for coveralls + run: | + echo "PYTHON_ENV=$(echo py${{ matrix.python-version }} | tr -d .)" >> $GITHUB_ENV + - name: Coveralls Parallel + env: + COVERALLS_FLAG_NAME: ${{ env.PYTHON_ENV }} + COVERALLS_PARALLEL: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + coverage run --source=challengeutils --omit=challengeutils/__main__.py -m pytest tests/ + coveralls --service=github + + finish-coveralls: + needs: build + runs-on: ubuntu-latest + container: python:3-slim + steps: + - name: Finish Coveralls Parallel + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + pip3 install --upgrade coveralls + coveralls --finish diff --git a/README.md b/README.md index 0327ef0e..a0e93eca 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Sage Bionetworks Challenge Utilities -[![Get challengeutils from PyPI](https://img.shields.io/pypi/v/challengeutils.svg?style=for-the-badge&logo=appveyor)](https://pypi.python.org/pypi/challengeutils) [![Docker Automated](https://img.shields.io/docker/automated/sagebionetworks/challengeutils.svg?style=for-the-badge&logo=appveyor)](https://hub.docker.com/r/sagebionetworks/challengeutils/) [![Docker Pull](https://img.shields.io/docker/pulls/sagebionetworks/challengeutils.svg?style=for-the-badge&logo=appveyor)](https://hub.docker.com/r/sagebionetworks/challengeutils/) +[![Get challengeutils from PyPI](https://img.shields.io/pypi/v/challengeutils.svg?style=for-the-badge&logo=pypi)](https://pypi.python.org/pypi/challengeutils) [![Docker Automated](https://img.shields.io/docker/automated/sagebionetworks/challengeutils.svg?style=for-the-badge&logo=docker)](https://hub.docker.com/r/sagebionetworks/challengeutils/) [![Docker Pull](https://img.shields.io/docker/pulls/sagebionetworks/challengeutils.svg?style=for-the-badge&logo=docker)](https://hub.docker.com/r/sagebionetworks/challengeutils/) [![Coverage Status](https://img.shields.io/coveralls/github/Sage-Bionetworks/challengeutils.svg?&style=for-the-badge&label=coverage&logo=Coveralls)](https://coveralls.io/github/Sage-Bionetworks/challengeutils) + `challengeutils` is a set of tools and commands that provides an interface for managing crowd-sourced challenges administered on [Synapse](https://www.synapse.org), including but not limited to, [DREAM Challenges](http://dreamchallenges.org/). Its main purpose is to ease the process of creating, monitoring, and ending a challenge, as well as provide useful functions for post-competition analysis. _This package is being actively developed and maintained by DREAM and Informatics & Biocomputing (IBC), Computational Oncology Group at Sage Bionetworks._