-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from pytest-dev/release-0.5
* Use dedicated workflow for publishing. * Update RELEASING and DEVELOPER docs. * Rename `CHANGES` to `CHANGELOG`, more commonly used in pytest-dev.
- Loading branch information
Showing
8 changed files
with
132 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,33 @@ | ||
name: Test | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
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 | ||
|
@@ -18,31 +39,23 @@ jobs: | |
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: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | ||
- name: Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: | ||
${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ hashFiles('**/tox.ini') }} | ||
restore-keys: | | ||
${{ matrix.os }}-${{ matrix.python-version }}-v1- | ||
- name: Install dependencies | ||
- name: Install tox | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e . | ||
python -m pip install -r tests/requirements.txt | ||
python -m pip install --upgrade tox | ||
- name: Test | ||
shell: bash | ||
run: | | ||
pytest -vv | ||
tox run -e py --installpkg `find dist/*.tar.gz` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
include CHANGES.rst | ||
include CHANGELOG.rst | ||
include COPYING-GPLv3.txt | ||
include README.rst | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ Helps converting unittest test-cases to pytest | |
|
||
:Author: Hartmut Goebel <[email protected]> | ||
:Version: 0.5.dev0 | ||
:Copyright: 2015-2019 by Hartmut Goebel | ||
:Copyright: 2015 by Hartmut Goebel | ||
:Licence: GNU Public Licence v3 or later (GPLv3+) | ||
:Homepage: https://github.com/pytest-dev/unittest2pytest | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
========================= | ||
Releasing unittest2pytest | ||
========================= | ||
|
||
This document describes the steps to make a new ``unittest2pytest`` release. | ||
|
||
Version | ||
------- | ||
|
||
``main`` should always be green and a potential release candidate. ``unittest2pytest`` follows | ||
semantic versioning, so given that the current version is ``X.Y.Z``, to find the next version number | ||
one needs to look at the ``CHANGELOG.rst`` file: | ||
|
||
- If there any new feature, then we must make a new **minor** release: next | ||
release will be ``X.Y+1.0``. | ||
|
||
- Otherwise it is just a **bug fix** release: ``X.Y.Z+1``. | ||
|
||
|
||
Steps | ||
----- | ||
|
||
To publish a new release ``X.Y.Z``, the steps are as follows: | ||
|
||
#. Create a new branch named ``release-X.Y.Z`` from the latest ``main``. | ||
|
||
#. Update the version in ``unittest2pytest/__init__.py``. | ||
|
||
#. Update the ``CHANGELOG.rst`` file with the new release information. | ||
|
||
#. Commit and push the branch to ``upstream`` and open a PR. | ||
|
||
#. Once the PR is **green** and **approved**, start the ``deploy`` workflow: | ||
|
||
.. code-block:: console | ||
gh workflow run deploy.yml -R pytest-dev/unittest2pytest --ref release-VERSION --field version=VERSION | ||
The PR will be automatically merged. | ||
|
||
#. Update the version in ``unittest2pytest/__init__.py`` and ``CHANGELOG.rst`` for the next release (usually use "minor+1" with the ``.dev0`` suffix). | ||
|
Oops, something went wrong.