-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bernát Gábor <[email protected]>
- Loading branch information
1 parent
2198e2b
commit 4e83145
Showing
6 changed files
with
113 additions
and
127 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
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,14 +1,16 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea or new feature for this project | ||
|
||
--- | ||
|
||
**How would this feature be useful?** | ||
|
||
<!-- Describe any use cases this solves or frustrations it alleviates. --> | ||
|
||
**Describe the solution you'd like** | ||
|
||
<!-- If you have an idea of how to do this, write it here! --> | ||
|
||
**Describe alternatives you've considered** | ||
|
||
<!-- If there's some workaround or alternative solutions, let us know. --> |
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,11 +1,15 @@ | ||
<!-- add an 'x' in the brackets below --> | ||
* [ ] I have added an entry to `docs/changelog.md` | ||
|
||
- [ ] I have added an entry to `docs/changelog.md` | ||
|
||
## Summary of changes | ||
|
||
## Test plan | ||
|
||
<!-- provide evidence of testing, preferably with command(s) that can be copy+pasted by others --> | ||
|
||
Tested by running | ||
|
||
``` | ||
# command(s) to exercise these 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
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,11 +1,3 @@ | ||
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions | ||
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | ||
# | ||
# Needed GitHub Repository Secret: | ||
# PYPI_PASSWORD - PyPI API token allowing write, release access to PyPI. | ||
# Limit scope to just project. | ||
# (See package.python.org example link above.) | ||
|
||
name: tests | ||
|
||
on: | ||
|
@@ -14,10 +6,9 @@ on: | |
schedule: | ||
- cron: "0 8 * * *" | ||
concurrency: | ||
group: check-${{ github.ref }} | ||
group: tests-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
# If changing default-python be sure to change job "tests" matrix: include: also | ||
env: | ||
default-python: "3.12" | ||
|
||
|
@@ -36,57 +27,44 @@ jobs: | |
python-version: "3.12" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Persistent Github pip cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip${{ matrix.python-version }} | ||
- name: Persistent .pipx_tests/package_cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ github.workspace }}/.pipx_tests/package_cache/${{ matrix.python-version }} | ||
key: pipx-tests-package-cache-${{ runner.os }}-${{ matrix.python-version }} | ||
- name: Upgrade pip, Install nox | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install nox | ||
- name: Execute Tests | ||
run: | | ||
nox --non-interactive --session tests-${{ matrix.python-version }} | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
- name: Persistent .pipx_tests/package_cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ github.workspace }}/.pipx_tests/package_cache/${{ matrix.python-version }} | ||
key: pipx-tests-package-cache-${{ runner.os }}-${{ matrix.python-version }} | ||
- name: Install nox | ||
run: python -m pip install nox | ||
- name: Execute Tests | ||
run: nox --non-interactive --session tests-${{ matrix.python-version }} | ||
|
||
pypi-publish: | ||
name: Publish pipx to PyPI on release | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
needs: [tests] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout ${{ github.ref }} | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ env.default-python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.default-python }} | ||
- name: Upgrade pip, Install nox | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install nox | ||
- name: Build sdist and wheel | ||
run: | | ||
nox --error-on-missing-interpreters --non-interactive --session build | ||
- name: Publish to PyPi | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
- name: Checkout ${{ github.ref }} | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ env.default-python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.default-python }} | ||
cache: "pip" | ||
- name: Install nox | ||
run: pip install nox | ||
- name: Build sdist and wheel | ||
run: nox --error-on-missing-interpreters --non-interactive --session build | ||
- name: Publish to PyPi | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
|
||
build-zipapp: | ||
name: Build zipapp | ||
|
@@ -100,16 +78,15 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.default-python }} | ||
- name: Upgrade pip, Install shiv | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install shiv | ||
cache: "pip" | ||
- name: Install shiv | ||
run: pip install shiv | ||
- name: Build zipapp | ||
run: shiv -c pipx -o ./pipx.pyz git+https://github.com/pypa/pipx@${{ github.ref_name }} | ||
- name: Test zipapp | ||
run: | | ||
python ./pipx.pyz --version | ||
python ./pipx.pyz install black | ||
- name: Show zipapp version | ||
run: python ./pipx.pyz --version | ||
- name: Test zipapp by installing black | ||
run: python ./pipx.pyz install black | ||
- name: Upload to releases | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
|