-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop Python 3.8 and modernize workflows
* Drop Python 3.8 EOL support. * Modernize workflows to be consistent with the other workflows/good practices used in other `pytest-dev` repositories.
- Loading branch information
1 parent
5f0f046
commit e3b1bff
Showing
11 changed files
with
150 additions
and
78 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,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
time: "03:00" | ||
open-pull-requests-limit: 10 |
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,51 @@ | ||
name: deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Release version' | ||
required: true | ||
default: '1.2.3' | ||
|
||
jobs: | ||
|
||
package: | ||
runs-on: ubuntu-latest | ||
env: | ||
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build and Check Package | ||
uses: hynek/[email protected] | ||
|
||
deploy: | ||
needs: package | ||
runs-on: ubuntu-latest | ||
environment: deploy | ||
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,30 +2,58 @@ name: test | |
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- "test-me-*" | ||
|
||
pull_request: | ||
workflow_call: | ||
branches: | ||
- "*" | ||
|
||
|
||
# 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", "3.12", "pypy-3.8"] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
os: ["ubuntu-latest", "windows-latest"] | ||
python: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox | ||
- name: Test | ||
run: | | ||
tox -e py | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download Package | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Packages | ||
path: dist | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- 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` |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
========================= | ||
Releasing pytest-rich | ||
========================= | ||
|
||
This document describes the steps to make a new ``pytest-rich`` release. | ||
|
||
Version | ||
------- | ||
|
||
``master`` should always be green and a potential release candidate. ``pytest-rich`` 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 ``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/pytest-rich --ref release-VERSION --field version=VERSION | ||
The PR will be automatically merged. |
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
requires = [ | ||
"setuptools>=42", | ||
"setuptools-scm", | ||
"wheel" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
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
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