Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use coveralls' github action #678

Merged
merged 9 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["pypy-3.9", "pypy3"]
- ["3.10", "docs"]
# - ["3.10", "docs"] # disable as readthedocs builds it
stevepiercy marked this conversation as resolved.
Show resolved Hide resolved
- ["3.11", "py311"]
stevepiercy marked this conversation as resolved.
Show resolved Hide resolved
- ["3.12", "py312"]

Expand All @@ -47,13 +47,13 @@ jobs:
pip install tox coveralls coverage-python-version
- name: Test
run: tox -e ${{ matrix.config[1] }}
- name: Upload coverage data to coveralls.io
run: coveralls --service=github || which coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.CODECOV_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.config[1] }}
COVERALLS_PARALLEL: true
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ matrix.config[1] }}
parallel: true
file: coverage.xml
allow-empty: true

coverage:
# parallel test coverage upload
Expand All @@ -64,15 +64,12 @@ jobs:
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-not-requiring-successful-dependent-jobs
if: ${{ always() }}
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Install dependencies
run: pip3 install --upgrade coveralls
- name: Upload coverage
run: coveralls --service=github --finish || which coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
format: cobertura

deploy-tag-to-pypi:
# only deploy on tags, see https://stackoverflow.com/a/58478262/1320237
Expand Down
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ Minor changes:
- Parallelize coverage
- Rename ``master`` branch to ``main``, see `Issue
<https://github.com/collective/icalendar/issues/627>`_
- Update ``docs/usage.rst`` to use zoneinfo instead of pytz.
- Update ``docs/usage.rst`` to use zoneinfo instead of pytz.
- Added missing public classes and functions to API documentation.
- Improved namespace management in the ``icalendar`` directory.
- Add Python version badge and badge for test coverage
- Remove 4.x badge
- Update list of ``tox`` environments
- Use Coveralls' GitHub Action

Breaking changes:

Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ commands =
coverage run --source=src/icalendar --omit=*/tests/hypothesis/* --omit=*/tests/fuzzed/* --module pytest []
coverage report
coverage html
coverage xml

[testenv:nopytz]
# install with dependencies
Expand All @@ -34,6 +35,7 @@ commands =
coverage run --source=src/icalendar --omit=*/tests/hypothesis/* --omit=*/tests/fuzzed/* --module pytest []
coverage report
coverage html
coverage xml

[testenv:docs]
deps =
Expand Down