Skip to content

Commit

Permalink
Generate and upload attestations to PyPI (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Oct 6, 2024
2 parents 96a2ce2 + 104b4fd commit 6e16948
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
- name: Upload package to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
repository-url: https://test.pypi.org/legacy/

# Upload to real PyPI on GitHub Releases.
Expand Down Expand Up @@ -88,3 +89,5 @@ jobs:

- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
10 changes: 3 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ permissions:

env:
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1

jobs:
test:
Expand All @@ -26,16 +25,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U tox
- name: Install uv
uses: hynek/setup-cached-uv@v2

- name: Tox tests
run: |
tox -e py
uvx --with tox-uv tox -e py
- name: Upload coverage
uses: codecov/codecov-action@v3.1.5
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
rev: v0.6.9
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
Expand All @@ -12,7 +12,7 @@ repos:
exclude: ^html/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -26,28 +26,28 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
rev: 0.29.3
hooks:
- id: check-github-workflows
- id: check-renovate

- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
rev: v1.7.3
hooks:
- id: actionlint

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.2.3
rev: 2.2.4
hooks:
- id: pyproject-fmt

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.19
rev: v0.20.2
hooks:
- id: validate-pyproject

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.4.0
rev: 1.4.1
hooks:
- id: tox-ini-fmt

Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ lint.select = [
"YTT", # flake8-2020
]
lint.ignore = [
"E203", # Whitespace before ':'
"E221", # Multiple spaces before operator
"E226", # Missing whitespace around arithmetic operator
"E241", # Multiple spaces after ','
"E203", # Whitespace before ':'
"E221", # Multiple spaces before operator
"E226", # Missing whitespace around arithmetic operator
"E241", # Multiple spaces after ','
"UP038", # Makes code slower and more verbose
]
lint.flake8-import-conventions.aliases.datetime = "dt"
lint.flake8-import-conventions.banned-from = [ "datetime" ]
Expand Down

0 comments on commit 6e16948

Please sign in to comment.