Skip to content

Commit

Permalink
Merge pull request #22 from pysat/coveralls
Browse files Browse the repository at this point in the history
Coveralls
  • Loading branch information
aburrell authored Aug 14, 2024
2 parents 74c4e2f + dc8b387 commit a089342
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 33 deletions.
35 changes: 19 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.11"]
python-version: ["3.11", "3.12"]
numpy_ver: ["latest"]
test_config: ["latest"]
include:
# NEP29 compliance settings
- python-version: "3.9"
numpy_ver: "1.21"
- python-version: "3.10"
numpy_ver: "1.24"
os: ubuntu-latest
test_config: "NEP29"
# Operational compliance settings
Expand All @@ -31,9 +31,9 @@ jobs:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with numpy ${{ matrix.numpy_ver }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -67,22 +67,25 @@ jobs:
run: flake8 . --count --exit-zero --max-complexity=10 --statistics

- name: Test with pytest
run: pytest
run: pytest --cov-report xml

- name: Publish results to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
run: coveralls --rcfile=pyproject.toml --service=github
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run=${{ join(matrix.*, '-') }}
parallel: true
format: cobertura
debug: 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:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
31 changes: 17 additions & 14 deletions .github/workflows/pysat_rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10"]
python-version: ["3.12"]

name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -42,22 +42,25 @@ jobs:
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'"
- name: Test with pytest
run: pytest
run: pytest --cov-report xml

- name: Publish results to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
run: coveralls --rcfile=pyproject.toml --service=github
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run=${{ join(matrix.*, '-') }}
parallel: true
format: cobertura
debug: 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:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ pysatEcosystem_Template Change Log
All notable changes to this template will be documented in this section.
This project adheres to Semantic Versioning.

[0.1.X] - 2024-XX-XX
--------------------
* Updated coveralls integration
* Cycled Python and NEP29 testing

[0.1.1] - 2024-02-29
--------------------
* Updated acknowledgements statement
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ classifiers = [
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows"
Expand All @@ -42,7 +41,6 @@ dependencies = [

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

0 comments on commit a089342

Please sign in to comment.