diff options
-rw-r--r-- | .github/workflows/test-release.yml | 28 |
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' |