Skip to content

[DNM] Smoke test #344

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

Closed
wants to merge 10 commits into from
20 changes: 20 additions & 0 deletions .github/workflows/reusable-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,26 @@ env:
PYTEST_THEME_MODE

jobs:
legit-pr:

runs-on: ubuntu-latest

timeout-minutes: 1

steps:
- name: Fail on PRs against illegal branches
if: github.event_name == 'pull_request'
run: echo github.base_ref='"${{ github.base_ref }}"'

- name: Fail on PRs against illegal branches
if: >-
github.event_name == 'pull_request' &&
github.base_ref == format(
'refs/heads/{0}',
github.event.repository.default_branch
)
run: exit 1

fail-fast:

strategy:
Expand Down
19 changes: 9 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: add-trailing-comma

- repo: https://github.com/PyCQA/isort.git
rev: 5.13.2
rev: 6.0.0
hooks:
- id: isort
args:
Expand All @@ -22,7 +22,7 @@ repos:
- id: remove-tabs

- repo: https://github.com/python-jsonschema/check-jsonschema.git
rev: 0.29.2
rev: 0.31.1
hooks:
- id: check-github-actions
- id: check-github-workflows
Expand All @@ -37,7 +37,7 @@ repos:
- id: check-readthedocs

- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.6.0
rev: v5.0.0
hooks:
# Side-effects:
- id: end-of-file-fixer
Expand All @@ -62,7 +62,7 @@ repos:
language_version: python3

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.4.1
hooks:
- id: codespell

Expand All @@ -78,7 +78,7 @@ repos:
- --strict

- repo: https://github.com/PyCQA/flake8.git
rev: 7.0.0
rev: 7.1.1
hooks:
- id: flake8
args:
Expand Down Expand Up @@ -111,13 +111,12 @@ repos:
WPS453,
- --max-module-members=8 # WPS202
additional_dependencies:
- flake8-2020 ~= 1.7.0
- flake8-pytest-style ~= 1.6.0
- wemake-python-styleguide ~= 0.19.0
language_version: python3.11 # flake8-commas doesn't work w/ Python 3.12
- flake8-2020 ~= 1.8.1
- flake8-pytest-style ~= 2.1.0
- wemake-python-styleguide ~= 1.0.0

- repo: https://github.com/PyCQA/pylint.git
rev: v3.3.0
rev: v3.3.4
hooks:
- id: pylint
args:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12-slim
FROM python:3.13-slim

LABEL "maintainer" "Sviatoslav Sydorenko <wk+pypa@sydorenko.org.ua>"
LABEL "repository" "https://github.com/pypa/gh-action-pypi-publish"
Expand All @@ -12,7 +12,7 @@ ENV PIP_NO_CACHE_DIR 1
ENV PIP_ROOT_USER_ACTION ignore

ENV PATH "/root/.local/bin:${PATH}"
ENV PYTHONPATH "/root/.local/lib/python3.12/site-packages"
ENV PYTHONPATH "/root/.local/lib/python3.13/site-packages"

COPY requirements requirements
RUN \
Expand Down
4 changes: 2 additions & 2 deletions attestations.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def assert_attestations_do_not_pre_exist(

existing_attestations_list = '\n'.join(map(str, existing_attestations))
error_message = (
'The following distributions already have publish attestations:'
f'{existing_attestations_list}',
'The following distributions already have publish attestations: '
f'{existing_attestations_list}'
)
die(error_message)

Expand Down
2 changes: 1 addition & 1 deletion requirements/runtime-prerequisites.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pip-with-requires-python
pip
8 changes: 3 additions & 5 deletions requirements/runtime-prerequisites.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile --allow-unsafe --config=../.pip-tools.toml --output-file=runtime-prerequisites.txt --strip-extras runtime-prerequisites.in
#
pip-with-requires-python==1.0.1
# via -r runtime-prerequisites.in

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
# via pip-with-requires-python
pip==24.3.1
# via -r runtime-prerequisites.in
3 changes: 1 addition & 2 deletions requirements/runtime.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile --allow-unsafe --config=../.pip-tools.toml --output-file=runtime.txt --strip-extras runtime.in
Expand Down Expand Up @@ -147,7 +147,6 @@ typing-extensions==4.12.2
# via
# pydantic
# pydantic-core
# pyopenssl
urllib3==2.3.0
# via
# requests
Expand Down
Loading