Skip to content

Commit

Permalink
Configuring for pure-python
Browse files Browse the repository at this point in the history
  • Loading branch information
icemac committed Mar 6, 2025
1 parent 3f01a9b commit e8634c0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,24 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv + caching
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.config[0] }}
allow-prereleases: true
- name: Pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
enable-cache: true
cache-dependency-glob: |
setup.*
tox.ini
python-version: ${{ matrix.matrix.config[0] }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test
if: ${{ !startsWith(runner.os, 'Mac') }}
run: tox -e ${{ matrix.config[1] }}
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}
- name: Test (macOS)
if: ${{ startsWith(runner.os, 'Mac') }}
run: tox -e ${{ matrix.config[1] }}-universal2
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls
coveralls --service=github
uvx coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = "pure-python"
commit-id = "18bd2267"
commit-id = "891c33f9"

[python]
with-windows = false
Expand Down
15 changes: 13 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# https://github.com/zopefoundation/meta/tree/master/config/pure-python

[build-system]
requires = ["setuptools <= 75.6.0"]
requires = [
"setuptools <= 75.6.0",
]
build-backend = "setuptools.build_meta"

[tool.coverage.run]
Expand All @@ -15,7 +17,16 @@ fail_under = 99
precision = 2
ignore_errors = true
show_missing = true
exclude_lines = ["pragma: no cover", "pragma: nocover", "except ImportError:", "raise NotImplementedError", "if __name__ == '__main__':", "self.fail", "raise AssertionError", "raise unittest.Skip"]
exclude_lines = [
"pragma: no cover",
"pragma: nocover",
"except ImportError:",
"raise NotImplementedError",
"if __name__ == '__main__':",
"self.fail",
"raise AssertionError",
"raise unittest.Skip",
]

[tool.coverage.html]
directory = "parts/htmlcov"

0 comments on commit e8634c0

Please sign in to comment.