-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GHA: Wait for gitlint package to be available after publish (#434)
It takes a short time for packages to show up on PyPI after publishing. Wait for the gitlint package to show up before starting the post-release test run by trying to install the gitlint package, and retrying after a timeout until the package is available.
- Loading branch information
1 parent
0b6b1b3
commit f5ef2ee
Showing
2 changed files
with
32 additions
and
4 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 |
---|---|---|
|
@@ -96,9 +96,39 @@ jobs: | |
HATCH_INDEX_AUTH: ${{ secrets.TEST_PYPI_GITLINT_PASSWORD }} | ||
if: inputs.pypi_target == 'test.pypi.org' && inputs.repo_release_ref == 'main' | ||
|
||
test_release: | ||
# Wait for gitlint package to be available in PyPI for installation | ||
wait-for-package: | ||
needs: | ||
- publish | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Install gitlint | ||
uses: nick-fields/[email protected] | ||
with: | ||
timeout_minutes: 1 | ||
max_attempts: 10 | ||
command: | | ||
python -m pip install gitlint==${{ needs.publish.outputs.gitlint_version }} | ||
if: inputs.pypi_target == 'pypi.org' | ||
|
||
- name: Install gitlint (test.pypi.org) | ||
uses: nick-fields/[email protected] | ||
with: | ||
timeout_minutes: 1 | ||
max_attempts: 10 | ||
command: | | ||
pip install --no-cache -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple gitlint==${{ needs.publish.outputs.gitlint_version }} | ||
if: inputs.pypi_target == 'test.pypi.org' | ||
|
||
- name: gitlint --version | ||
run: | | ||
gitlint --version | ||
[ "$(gitlint --version)" == "gitlint, version ${{ needs.publish.outputs.gitlint_version }}" ] | ||
test-release: | ||
needs: | ||
- publish | ||
- wait-for-package | ||
uses: ./.github/workflows/test-release.yml | ||
with: | ||
gitlint_version: ${{ needs.publish.outputs.gitlint_version }} | ||
|
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