chore(deps): update dependency click to v8.1.8 #1445
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
--- | |
name: build | |
defaults: | |
run: | |
shell: bash | |
env: | |
POETRY_HOME: ~/.poetry | |
# renovate: datasource=github-tags depName=python-poetry/poetry | |
POETRY_VERSION: '1.8.5' | |
POETRY_VIRTUALENVS_IN_PROJECT: true | |
on: [push, pull_request] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 2 | |
- name: Identify Python version | |
run: echo "PYTHON_VERSION=$(python -V | cut -d' ' -f2)" >> "$GITHUB_ENV" | |
- name: Cache Poetry | |
id: cache-poetry | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
with: | |
path: ${{ env.POETRY_HOME }} | |
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ env.POETRY_VERSION }} | |
- name: Install Poetry | |
if: steps.cache-poetry.outputs.cache-hit != 'true' | |
run: curl -sSL https://install.python-poetry.org | python | |
- name: Prepend Poetry to PATH | |
run: echo ${{ env.POETRY_HOME }}/bin >> "$GITHUB_PATH" | |
- name: Cache venv | |
id: cache-venv | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('poetry.lock') }} | |
restore-keys: venv-${{ runner.os }}-${{ env.PYTHON_VERSION }}- | |
- name: Install dependencies | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root --sync -v | |
- name: Install root package | |
run: poetry install --no-interaction --only-root -v | |
- name: Cache pre-commit hooks | |
id: cache-pre-commit | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
restore-keys: | | |
pre-commit-${{ runner.os }}-${{ env.PYTHON_VERSION }}- | |
pre-commit-${{ runner.os }}- | |
- name: Prune pre-commit hooks | |
if: steps.cache-pre-commit.outputs.cache-hit != 'true' | |
run: poetry run pre-commit gc | |
- name: Cache mypy | |
id: cache-mypy | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
with: | |
path: .mypy_cache | |
key: mypy-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('poetry.lock') }}-${{ github.sha }} | |
restore-keys: mypy-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('poetry.lock') }}- | |
- name: Run gitlint | |
run: poetry run pre-commit run --color=always --hook-stage manual gitlint-ci | |
- name: Run pre-commit | |
run: poetry run pre-commit run --all-files --color=always --show-diff-on-failure | |
pytest: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
id: setup-python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Poetry | |
id: cache-poetry | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
with: | |
path: ${{ env.POETRY_HOME }} | |
key: poetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ env.POETRY_VERSION }} | |
- name: Install Poetry | |
if: steps.cache-poetry.outputs.cache-hit != 'true' | |
run: curl -sSL https://install.python-poetry.org | python | |
- name: Prepend Poetry to PATH | |
run: echo ${{ env.POETRY_HOME }}/bin >> "$GITHUB_PATH" | |
- name: Cache venv | |
id: cache-venv | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} | |
restore-keys: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}- | |
- name: Install dependencies | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root --sync -v | |
- name: Install root package | |
run: poetry install --no-interaction --only-root -v | |
- name: Run pytest | |
run: poetry run pytest --color=yes --cov-config=pyproject.toml --numprocesses=8 --with-functional | |
- name: Upload coverage report | |
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Run SonarQube scanner | |
uses: SonarSource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1 | |
if: matrix.os != 'macos-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
release: | |
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
needs: [pre-commit, pytest] | |
runs-on: ubuntu-latest | |
concurrency: release | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Identify Python version | |
run: echo "PYTHON_VERSION=$(python -V | cut -d' ' -f2)" >> "$GITHUB_ENV" | |
- name: Cache Poetry | |
id: cache-poetry | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
with: | |
path: ${{ env.POETRY_HOME }} | |
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ env.POETRY_VERSION }} | |
- name: Install Poetry | |
if: steps.cache-poetry.outputs.cache-hit != 'true' | |
run: curl -sSL https://install.python-poetry.org | python | |
- name: Prepend Poetry to PATH | |
run: echo ${{ env.POETRY_HOME }}/bin >> "$GITHUB_PATH" | |
- name: Cache venv | |
id: cache-venv | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('poetry.lock') }} | |
restore-keys: venv-${{ runner.os }}-${{ env.PYTHON_VERSION }}- | |
- name: Install dependencies | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root --sync -v | |
- name: Set up Git signing | |
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0 | |
with: | |
gpg_private_key: ${{ secrets.GPG_SIGN_KEY }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_tag_gpgsign: true | |
- name: Bump version | |
id: bump-version | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: poetry run semantic-release version | |
- name: Publish package distributions to GitHub Releases | |
if: steps.bump-version.outputs.released == 'true' | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: poetry run semantic-release publish | |
- name: Publish package distributions to PyPI | |
if: steps.bump-version.outputs.released == 'true' | |
uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3 |