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

Release 2.6.0 #178

Closed
wants to merge 2 commits into from
Closed
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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
groups:
github-actions:
patterns:
- "*" # Group all Actions updates into a single larger pull request
schedule:
interval: weekly
48 changes: 48 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: deploy

on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
default: '1.2.3'

jobs:

package:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build and Check Package
uses: hynek/[email protected]

deploy:
needs: package
runs-on: ubuntu-latest
permissions:
id-token: write # For PyPI trusted publishers.
contents: write # For tag.

steps:
- uses: actions/checkout@v4

- name: Download Package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Publish package to PyPI
uses: pypa/[email protected]
with:
attestations: true

- name: GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ github.event.inputs.version }} --target=${{ github.ref_name }} --title v${{ github.event.inputs.version }}
gh pr merge ${{ github.ref_name }} --merge
68 changes: 0 additions & 68 deletions .github/workflows/main.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Test

on:
push:
branches:
- main
- "test-me-*"

pull_request:
branches:
- "*"

env:
FORCE_COLOR: 1

# Cancel running jobs for the same workflow and branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and Check Package
uses: hynek/[email protected]

test:
needs: [package]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v4

- name: Download Package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox

- name: Test
shell: bash
run: |
tox run -e py --installpkg `find dist/*.tar.gz`
6 changes: 4 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
UNRELEASED
----------
2.6.0
-----

*2024-12-17*

* `#132 <https://github.com/ESSS/pytest-regressions/pull/132>`__: Added documentation for specifying custom data directories.
* `#177 <https://github.com/ESSS/pytest-regressions/pull/177>`__: Added new ``round_digits`` to ``data_regression.check``, which when given will round all float values to the given number of dicts (recursively) before saving the data to disk.
Expand Down
11 changes: 8 additions & 3 deletions HOWTORELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
Here are the steps on how to make a new release.

#. Create a ``release-VERSION`` branch from ``upstream/master``.
#. Create a ``release-VERSION`` branch from ``origin/master``.
#. Update ``CHANGELOG.rst``.
#. Push a branch with the changes.
#. Wait for all builds to pass and at least one approval.
#. Push a tag ``VERSION`` to ``upstream``.
#. Merge the PR.
#. Start the ``deploy`` workflow:

.. code-block:: console

gh workflow run deploy.yml -R esss/pytest-regressions --ref release-VERSION --field version=VERSION

The PR will be automatically merged.

After this, the package should be published directly to PyPI. After a few hours, it should be picked up by the conda-forge bot, where one of the maintainers need to merge it so the package can be published (another couple of hours after that).
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def read(fname: str) -> str:
url="https://github.com/ESSS/pytest-regressions",
description="Easy to use fixtures to write regression tests.",
long_description=read("README.rst"),
long_description_content_type="text/x-rst",
packages=find_packages("src"),
package_dir={"": "src"},
python_requires=">=3.8",
Expand Down
Loading