forked from seomoz/qless-py
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop tracking version and add action to explicitly handle releases
- Loading branch information
Showing
11 changed files
with
207 additions
and
31 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
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,94 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Release version' | ||
required: true | ||
default: '1.2.3' | ||
|
||
jobs: | ||
test-and-build-and-publish-and-release: | ||
env: | ||
VERSION: ${{ github.event.inputs.version }} | ||
name: Test, build, publish, and release the package | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
token: ${{ secrets.PAT_GITHUB_ACTIONS }} | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y redis-server | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install -r requirements.txt | ||
- name: Check requirements.txt is up to date | ||
run: | | ||
source venv/bin/activate | ||
pip install .[all] | ||
pip uninstall -y reqless | ||
pip freeze > requirements.txt | ||
if ! `git diff --quiet`; then | ||
echo "pip freeze caused file changes, failing!" | ||
git diff | ||
exit 1 | ||
fi | ||
- name: Check style | ||
run: | | ||
source venv/bin/activate | ||
make style | ||
if ! `git diff --quiet`; then | ||
echo "make style caused file changes, failing!" | ||
git diff | ||
exit 1 | ||
fi | ||
- name: Run tests and build package | ||
run: | | ||
source venv/bin/activate | ||
make nose | ||
coverage report | tee .meta/coverage/report.txt | ||
coverage-badge -f -o .meta/coverage/badge.svg | ||
export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_REQLESS="$VERSION" | ||
python -m build | ||
- name: Publish package to pypi | ||
env: | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
TWINE_USERNAME: __token__ | ||
run: | | ||
source venv/bin/activate | ||
python -m twine upload dist/* | ||
- name: Configure git actor | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | ||
- name: Create and push tag for published version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB_ACTIONS }} | ||
RELEASE_NAME: v${{ github.event.inputs.version }} | ||
run: | | ||
git tag -m "$RELEASE_NAME" "$RELEASE_NAME" | ||
git push origin "$RELEASE_NAME" | ||
gh release create \ | ||
--generate-notes \ | ||
--target "$GITHUB_REF" \ | ||
--title "$RELEASE_NAME" \ | ||
"$RELEASE_NAME" |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
build/* | ||
dist/* | ||
htmlcov/* | ||
qless_with_throttles.egg-info/* | ||
reqless.egg-info/* | ||
.vagrant | ||
MANIFEST | ||
.tox/ | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,69 @@ | ||
Name Stmts Miss Cover | ||
----------------------------------------------------------------------------------------------------- | ||
/usr/lib/python3/dist-packages/pkg_resources/__init__.py 1532 1497 2% | ||
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/_structures.py 41 40 2% | ||
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/requirements.py 72 62 14% | ||
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/specifiers.py 306 294 4% | ||
/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py 160 140 12% | ||
/usr/lib/python3/dist-packages/pkg_resources/_vendor/pyparsing.py 2513 2301 8% | ||
/usr/lib/python3/dist-packages/pkg_resources/_vendor/six.py 444 442 1% | ||
/usr/lib/python3/dist-packages/pkg_resources/extern/__init__.py 36 33 8% | ||
qmore/__init__.py 0 0 100% | ||
qmore/client.py 42 1 98% | ||
reqless/__init__.py 146 1 99% | ||
reqless/abstract/__init__.py 15 0 100% | ||
reqless/abstract/abstract_client.py 23 0 100% | ||
reqless/abstract/abstract_config.py 18 0 100% | ||
reqless/abstract/abstract_job.py 56 0 100% | ||
reqless/abstract/abstract_job_data.py 6 0 100% | ||
reqless/abstract/abstract_job_processor.py 20 1 95% | ||
reqless/abstract/abstract_jobs.py 10 0 100% | ||
reqless/abstract/abstract_queue.py 27 0 100% | ||
reqless/abstract/abstract_queue_identifiers_transformer.py 4 0 100% | ||
reqless/abstract/abstract_queue_jobs.py 8 0 100% | ||
reqless/abstract/abstract_queue_resolver.py 4 0 100% | ||
reqless/abstract/abstract_queues.py 7 0 100% | ||
reqless/abstract/abstract_throttle.py 11 0 100% | ||
reqless/abstract/abstract_throttles.py 4 0 100% | ||
reqless/abstract/abstract_workers.py 6 0 100% | ||
reqless/config.py 50 0 100% | ||
reqless/exceptions.py 4 0 100% | ||
reqless/importer.py 26 0 100% | ||
reqless/job.py 280 15 95% | ||
reqless/listener.py 49 0 100% | ||
reqless/logger.py 13 0 100% | ||
reqless/proctitle.py 3 0 100% | ||
reqless/queue.py 89 0 100% | ||
reqless/queue_resolvers/__init__.py 4 0 100% | ||
reqless/queue_resolvers/qmore_dynamic_mapping_queue_identifiers_transformer.py 50 0 100% | ||
reqless/queue_resolvers/qmore_dynamic_priority_queue_identifiers_transformer.py 61 0 100% | ||
reqless/queue_resolvers/transforming_queue_resolver.py 13 0 100% | ||
reqless/throttle.py 29 0 100% | ||
reqless/util.py 7 0 100% | ||
reqless/workers/__init__.py 2 0 100% | ||
reqless/workers/forking.py 55 2 96% | ||
reqless/workers/greenlet.py 50 0 100% | ||
reqless/workers/serial.py 29 0 100% | ||
reqless/workers/util.py 39 1 97% | ||
reqless/workers/worker.py 78 3 96% | ||
reqless_test/__init__.py 0 0 100% | ||
reqless_test/common.py 31 1 97% | ||
reqless_test/test_client.py 144 6 96% | ||
reqless_test/test_config.py 43 0 100% | ||
reqless_test/test_events.py 36 1 97% | ||
reqless_test/test_forking.py 61 6 90% | ||
reqless_test/test_greenlet.py 67 15 78% | ||
reqless_test/test_importer.py 18 0 100% | ||
reqless_test/test_job.py 257 5 98% | ||
reqless_test/test_job_processor_api.py 31 2 94% | ||
reqless_test/test_listener.py 34 0 100% | ||
reqless_test/test_qmore_client.py 57 0 100% | ||
reqless_test/test_qmore_dynamic_mapping_queue_identifiers_transformer.py 123 0 100% | ||
reqless_test/test_qmore_dynamic_priority_queue_identifiers_transformer.py 133 0 100% | ||
reqless_test/test_queue.py 78 0 100% | ||
reqless_test/test_serial.py 91 0 100% | ||
reqless_test/test_transforming_queue_resolver.py 20 0 100% | ||
reqless_test/test_worker.py 53 0 100% | ||
reqless_test/test_worker_util.py 64 3 95% | ||
----------------------------------------------------------------------------------------------------- | ||
TOTAL 7783 4872 37% |
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 |
---|---|---|
|
@@ -54,6 +54,7 @@ dev = [ | |
] | ||
test = [ | ||
"coverage", | ||
"coverage-badge~=1.1.0", | ||
"mock", | ||
"nose", | ||
"rednose", | ||
|
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