-
Notifications
You must be signed in to change notification settings - Fork 90
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 #169 from nicoddemus/modernize-ci
Modernize CI workflow
- Loading branch information
Showing
18 changed files
with
138 additions
and
109 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=${{ github.event.inputs.version }} ${{ github.event.inputs.version }} ${{ github.sha }} | ||
git push origin ${{ github.event.inputs.version }} | ||
- name: GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: dist/* | ||
tag_name: ${{ 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.7", "3.8", "3.9"] | ||
os: [ubuntu-latest, windows-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 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,7 @@ | ||
Here are the steps on how to make a new release. | ||
|
||
1. Create a ``release-VERSION`` branch from ``upstream/main``. | ||
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools", | ||
"setuptools-scm[toml]", | ||
] | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pytest>=5.2 | ||
Flask | ||
Flask <3.0 | ||
Werkzeug>=0.7 |
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ keywords = pytest, flask, testing | |
author_email = [email protected] | ||
url = https://github.com/pytest-dev/pytest-flask | ||
long_description = file: README.rst, docs/changelog.rst, LICENSE | ||
long_description_content_type = text/x-rst | ||
description = A set of py.test fixtures to test Flask applications. | ||
project_urls = | ||
Source = https://github.com/pytest-dev/pytest-flask | ||
|
@@ -27,10 +28,12 @@ classifiers= | |
Topic :: Software Development :: Libraries :: Python Modules | ||
|
||
[options] | ||
packages = find: | ||
packages = pytest_flask | ||
zip_safe = False | ||
python_requires = >= 3.7 | ||
setup_requires = setuptools_scm | ||
package_dir = | ||
=src | ||
|
||
[options.packages.find] | ||
exclude = docs, tests | ||
|
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
0
pytest_flask/__init__.py → src/pytest_flask/__init__.py
100755 → 100644
File renamed without changes.
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
0
pytest_flask/plugin.py → src/pytest_flask/plugin.py
100755 → 100644
File renamed without changes.
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