bump: version 0.53.16 → 0.54.0 #1499
Workflow file for this run
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: Unit testing, formatting & linting | |
on: | |
- push | |
env: | |
PYTHON_VERSION_FOR_BUMPING: "3.10" | |
POETRY_VERSION: "1.6" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ env.PYTHON_VERSION_FOR_BUMPING }}" | |
- name: Cache multiple paths | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pip | |
~/.cache/pre-commit | |
key: ${{ runner.os }}-${{ env.PYTHON_VERSION_FOR_BUMPING }}-${{ hashFiles('**/.pre-commit-config.yaml') }} | |
- run: pip install -U pre-commit | |
- run: pre-commit run -a | |
testing: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache multiple Pips | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pip | |
.venv | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- run: pip install poetry~=${{ env.POETRY_VERSION }} | |
- run: poetry install --no-interaction --no-ansi --sync | |
- run: make lint | |
bump-version: | |
if: github.ref_name == github.event.repository.default_branch && !startsWith(github.event.head_commit.message, 'bump:') | |
needs: | |
- testing | |
- linting | |
runs-on: ubuntu-latest | |
name: "Bump version and create changelog with commitizen" | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
with: | |
token: "${{ secrets.PAT_TOKEN }}" | |
fetch-depth: 0 | |
- name: Setup Python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ env.PYTHON_VERSION_FOR_BUMPING }}" | |
- name: Cache virtual environment and pip | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pip | |
~/.cache/pre-commit | |
key: ${{ runner.os }}-${{ env.PYTHON_VERSION_FOR_BUMPING }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: | | |
pip install poetry~=${{ env.POETRY_VERSION }} | |
poetry install --with dev --no-interaction --no-ansi --sync | |
- name: Create new version and changelog | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Github Actions" | |
poetry run cz --no-raise 21 bump --yes --changelog --check-consistency | |
git config --local pull.rebase true | |
git pull origin $(git branch --show-current) | |
git push -u origin HEAD:$(git branch --show-current) | |
git push --tags |