-
Notifications
You must be signed in to change notification settings - Fork 22
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 #67 from nicoddemus/split-ci-workflows
Drop Python 3.7, add 3.11 and 3.12, Improve CI
- Loading branch information
Showing
8 changed files
with
129 additions
and
94 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,55 @@ | ||
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@v3 | ||
|
||
- 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 and release notes. | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download Package | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Packages | ||
path: dist | ||
|
||
- name: Publish package to PyPI | ||
uses: pypa/[email protected] | ||
|
||
- name: Push tag | ||
run: | | ||
git config user.name "pytest bot" | ||
git config user.email "[email protected]" | ||
git tag --annotate --message=v${{ github.event.inputs.version }} v${{ github.event.inputs.version }} ${{ github.sha }} | ||
git push origin v${{ github.event.inputs.version }} | ||
- name: GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: dist/* | ||
tag_name: v${{ github.event.inputs.version }} |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- "test-me-*" | ||
|
||
pull_request: | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build and Check Package | ||
uses: hynek/[email protected] | ||
|
||
test: | ||
|
||
needs: [package] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ["3.8", "3.9", "3.10", "3.11", "3.12-dev"] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download Package | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Packages | ||
path: dist | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install tox | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install 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
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,7 @@ | ||
Here are the steps on how to make a new release. | ||
|
||
1. Create a ``release-VERSION`` branch from ``upstream/master``. | ||
2. Update ``CHANGELOG.rst``. | ||
3. Push the branch to ``upstream``. | ||
4. Once all tests pass, start the ``deploy`` workflow manually. | ||
5. Merge the PR. |
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 |
---|---|---|
|
@@ -15,10 +15,7 @@ | |
"pytest11": ["pytest-datadir = pytest_datadir.plugin"], | ||
}, | ||
package_dir={"": "src"}, | ||
setup_requires=[ | ||
"setuptools_scm; python_version>'3.6'", | ||
"setuptools_scm <7.0; python_version=='3.6'", | ||
], | ||
setup_requires=["setuptools_scm"], | ||
install_requires=["pytest>=5.0"], | ||
author="Gabriel Reis", | ||
author_email="[email protected]", | ||
|
@@ -28,17 +25,17 @@ | |
license="MIT", | ||
keywords="pytest test unittest directory file", | ||
url="http://github.com/gabrielcnr/pytest-datadir", | ||
python_requires=">=3.6", | ||
python_requires=">=3.8", | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Software Development :: Quality Assurance", | ||
"Topic :: Software Development :: Testing", | ||
], | ||
|
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,6 +1,6 @@ | ||
[tox] | ||
envlist = py{36,37,38,39,310} | ||
envlist = py{38,39,310,311,312} | ||
|
||
[testenv] | ||
commands= | ||
pytest {posargs:tests} | ||
pytest --color=yes {posargs:tests} |