summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoris Roovers <joris.roovers@gmail.com>2023-01-23 10:02:46 +0100
committerGitHub <noreply@github.com>2023-01-23 10:02:46 +0100
commitc0f157f162f6a5bd28dc39df1a584e42ada7142c (patch)
tree049c15e5f2ad3173601a8913705f050dc5c3ea10
parentf76144d9f5b405f74d45769df4165f9742b6b370 (diff)
GHA: Test Release worfklow improvements (#416)
Added workflow inputs for: - PyPI repository to use - Git reference to checkout for integration tests
-rw-r--r--.github/workflows/test-release.yml28
1 files changed, 23 insertions, 5 deletions
diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml
index 419fe8f..b0af120 100644
--- a/.github/workflows/test-release.yml
+++ b/.github/workflows/test-release.yml
@@ -1,12 +1,23 @@
name: Release testing
-
+run-name: "Release testing (${{ inputs.gitlint_version }}, pypi_source=${{ inputs.pypi_source }}, test_repo_ref=${{ inputs.test_repo_ref }})"
on:
workflow_dispatch:
inputs:
gitlint_version:
- description: 'Gitlint version to test'
+ description: "Gitlint version to test"
+ required: true
+ default: "0.18.0"
+ pypi_source:
+ description: "PyPI repository to use"
required: true
- default: '0.18.0'
+ type: choice
+ options:
+ - "pypi.org"
+ - "test.pypi.org"
+ default: "pypi.org"
+ test_repo_ref:
+ description: "Git reference to checkout for integration tests"
+ default: "main"
jobs:
checks:
@@ -24,14 +35,21 @@ jobs:
- name: Install gitlint
run: |
python -m pip install gitlint==${{ inputs.gitlint_version }}
+ if: inputs.pypi_source == 'pypi.org'
+
+ - name: Install gitlint (test.pypi.org)
+ run: |
+ pip install --no-cache -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple gitlint==${{ inputs.gitlint_version }}
+ if: inputs.pypi_source == 'test.pypi.org'
- name: gitlint --version
run: |
gitlint --version
+ [ "$(gitlint --version)" == "gitlint, version ${{ inputs.gitlint_version }}" ]
- uses: actions/checkout@v3.3.0
with:
- ref: 'main'
+ ref: ${{ inputs.test_repo_ref }}
- name: Install Hatch
run: python -m pip install hatch==1.6.3
@@ -58,4 +76,4 @@ jobs:
- name: Integration tests (Windows)
run: |
hatch run qa:integration-tests -k "not (test_commit_hook_continue or test_commit_hook_abort or test_commit_hook_edit or test_lint_staged_stdin or test_stdin_file or test_stdin_pipe_empty)" qa
- if: matrix.os == 'windows-latest' \ No newline at end of file
+ if: matrix.os == 'windows-latest'