Skip to content

Commit

Permalink
Merge branch 'trunk' into 83-security-policy-ypdate
Browse files Browse the repository at this point in the history
  • Loading branch information
adiroiban authored May 6, 2024
2 parents 8dcd659 + 98fcde2 commit 410146b
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 63 deletions.
78 changes: 70 additions & 8 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ on:
branches: [ trunk ]


permissions:
contents: read


defaults:
run:
shell: bash



jobs:
testing:
runs-on: ubuntu-20.04
Expand All @@ -34,13 +37,14 @@ jobs:
# When updating the minimum Python version here, also update the
# `python_requires` from `setup.cfg`.
# Run on latest minor release of each major python version.
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12']
tox-env: ['tests']

include:
# Run non-python version specific jobs.
- python-version: 3.9
tox-env: mypy,apidocs
skip-coverage: true

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -77,10 +81,68 @@ jobs:
commit_message: Publish docs for ${{ github.sha }}
publish_dir: ./website

- uses: codecov/codecov-action@v1
if: always() && matrix.tox-env == 'tests'
- name: Prepare coverage results
if: ${{ !cancelled() && !matrix.skip-coverage }}
run: |
# Assign the coverage file a name unique to this job so that the
# uploads don't collide.
mv .coverage ".coverage-job-${{ matrix.python-version }}-${{ matrix.job-name }}"
- name: Store coverage file
if: ${{ !cancelled() && !matrix.skip-coverage }}
uses: actions/upload-artifact@v3
with:
name: coverage
path: .coverage-job-*

coverage-report:
name: Coverage report
runs-on: ubuntu-latest
# We want to always run the coverage, even when the
# tests failed.
if: always()
needs:
- testing # Wait for test jobs.
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade coverage[toml] diff_cover
- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: coverage
path: .

- name: Prepare coverage
run: |
coverage combine .coverage-job-*
# XML is needed for the diff-cover.
coverage xml
- name: Report coverage
run: |
# Report for the job log.
coverage report --skip-covered --skip-empty >> $GITHUB_STEP_SUMMARY
diff-cover --markdown-report coverage-report.md --compare-branch origin/trunk coverage.xml
- name: Enforce diff coverage
run: |
diff-cover --fail-under=100 --compare-branch origin/trunk coverage.xml
- name: Generate HTML report on failure
if: ${{ failure() }}
run: |
coverage html --skip-covered --skip-empty
- name: Upload HTML report on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
files: coverage.xml
name: lnx-${{ matrix.python-version }}-${{ matrix.tox-env }}
fail_ci_if_error: true
functionalities: gcov,search
name: html-report
path: htmlcov
50 changes: 0 additions & 50 deletions codecov.yaml

This file was deleted.

8 changes: 3 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ url = https://github.com/twisted/incremental
classifiers =
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
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
license = MIT
description = "A small library that versions your Python projects."
long_description = file: README.rst
Expand Down Expand Up @@ -47,9 +48,6 @@ mypy =
%(scripts)s
mypy==0.812

[bdist_wheel]
universal = 1

[flake8]
max-line-length = 88
extend-ignore =
Expand Down
1 change: 1 addition & 0 deletions src/incremental/86.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support for Python 2.7 has been dropped for lack of test infrastructure. We no longer provide universal wheels.
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
minversion = 3.23.0
requires =
virtualenv >= 20.4.3
tox < 4.0.0
tox-wheel >= 0.6.0
isolated_build = true
envlist =
Expand Down Expand Up @@ -38,6 +39,7 @@ commands =
tests: coverage report
tests: coverage html
tests: coverage xml

mypy: mypy src


Expand Down

0 comments on commit 410146b

Please sign in to comment.