diff options
author | Jordan Cook <jordan.cook.git@proton.me> | 2022-09-30 15:34:15 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook.git@proton.me> | 2022-09-30 18:27:44 -0500 |
commit | e41616481d0503630f8ce13fc40bb14d3d1f0390 (patch) | |
tree | 96296aa925375f69b6c96666dc299ef0f15ff61f /.github/workflows | |
parent | 71798462b26f0f1b65b9df6b555c2a0185515483 (diff) | |
download | requests-cache-e41616481d0503630f8ce13fc40bb14d3d1f0390.tar.gz |
Add options to deploy workflow to skip stress tests or skip publishing to PyPI
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/deploy.yml | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 694c757..2efcd7d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,6 +16,14 @@ on: description: 'Version number for pre-releases; defaults to build number' required: false default: '' + skip-stress: + description: 'Set to "true" to skip stress tests' + required: false + default: 'false' + skip-publish: + description: 'Set to "true" to skip publishing to PyPI' + required: false + default: 'false' env: LATEST_PY_VERSION: '3.10' @@ -26,6 +34,7 @@ jobs: # Run additional integration stress tests test-stress: + if: ${{ github.event.inputs.skip-stress != 'true' }} runs-on: ubuntu-latest services: @@ -66,7 +75,9 @@ jobs: # Run tests - name: Run stress tests - run: poetry run nox -e stress -- ${{ env.STRESS_TEST_MULTIPLIER }} + run: | + source $VENV + nox -e stress -- ${{ env.STRESS_TEST_MULTIPLIER }} # Run unit tests without any optional dependencies installed test-minimum-deps: @@ -95,7 +106,9 @@ jobs: # Run tests - name: Run tests with no optional dependencies - run: poetry run pytest -n auto tests/unit + run: | + source $VENV + pytest -n auto tests/unit # Run unit tests for all supported platforms, python versions, and requests versions test: @@ -136,6 +149,7 @@ jobs: # Deploy stable builds on tags only, and pre-release builds from manual trigger ("workflow_dispatch") release: + if: ${{ github.event.inputs.skip-publish != 'true' }} needs: [test, test-minimum-deps, test-stress] runs-on: ubuntu-latest steps: @@ -156,7 +170,7 @@ jobs: poetry version $(poetry version -s).${{ env.pre-release-suffix }}${{ env.pre-release-version }} poetry version - - name: Build and publish to pypi + - name: Build and publish to PyPI run: | poetry build poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }} |