Skip to content

Commit

Permalink
Merge pull request #43 from pysat/maint/coveralls
Browse files Browse the repository at this point in the history
MAINT: use coveralls app
  • Loading branch information
jklenzing authored Aug 14, 2024
2 parents 53cfd3f + eefd02c commit 79d87d0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 47 deletions.
46 changes: 12 additions & 34 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,42 +54,20 @@ jobs:
- name: Test with pytest
run: pytest

- name: Coveralls Parallel (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_PARALLEL: true
run: |
curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz
./coveralls report --parallel --repo-token=${{ secrets.COVERALLS_REPO_TOKEN }} --build-number ${{ github.run_number }}
- name: Coveralls Parallel (Windows)
if: startsWith(matrix.os, 'windows')
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_PARALLEL: true
run: |
curl -L https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-windows.exe -o coveralls.exe
./coveralls.exe report --parallel --repo-token=${{ secrets.COVERALLS_REPO_TOKEN }} --build-number ${{ github.run_number }}
- name: Coveralls Parallel (MacOS)
if: startsWith(matrix.os, 'macos')
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_PARALLEL: true
run: |
coveralls --rcfile=pyproject.toml --service=github
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true

finish:
name: Finish Coverage Analysis
needs: build
if: always()
runs-on: "ubuntu-latest"
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finish
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_PARALLEL: true
run: |
curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz
./coveralls done --build-number ${{ github.run_number }}
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true

22 changes: 11 additions & 11 deletions .github/workflows/pysat_rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ jobs:
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'"
- name: Test with pytest
run: pytest -vs --cov=pysatSeasons/
run: pytest

- name: Publish results to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
run: coveralls --rcfile=setup.cfg --service=github
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true

finish:
name: Finish Coverage Analysis
needs: build
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install --upgrade coveralls
coveralls --service=github --finish
uses: coverallsapp/github-action@v2
with:
parallel-finished: true

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Add workflow for testing the install of pysatSeasons RC from pip
- Dropped tests for deprecated pysat instruments
- Implement pyproject.toml
- Implement coveralls app for GitHub Actions

## [0.2.0] - 2022-08-12
- New Features
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ dependencies = [
]

[project.optional-dependencies]
pysatcdf = ["pysatCDF"]
test = [
"coveralls",
"flake8",
"flake8-docstrings",
"hacking >= 1.0",
Expand Down

0 comments on commit 79d87d0

Please sign in to comment.