Skip to content

Commit

Permalink
Trying to get coverage working again (#140)
Browse files Browse the repository at this point in the history
* Update tests.yml

* Update tests.yml
  • Loading branch information
dfm committed Jan 28, 2021
1 parent 6a77cba commit 55d2252
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,37 +56,18 @@ jobs:
shell: bash -l {0}
run: python -m pytest --cov=exoplanet -v tests

- name: Get unique id
id: unique-id
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: |
export JOB_ID=`echo $STRATEGY_CONTEXT | md5sum`
echo "::set-output name=id::$JOB_ID"
- uses: actions/upload-artifact@v2
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
name: cov-${{ steps.unique-id.outputs.id }}
path: .coverage
parallel: true
flag-name: Unit Tests

coverage:
name: "Merge and upload coverage"
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Download all artifacts
uses: actions/download-artifact@v2
- name: Merge and upload coverage
run: |
python -m pip install coveralls
find . -name \.coverage -exec coverage combine --append {} \;
coveralls
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
parallel-finished: true

0 comments on commit 55d2252

Please sign in to comment.