Skip to content

[pre-commit.ci] pre-commit autoupdate #194

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #194

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize]
branches: [master]
defaults:
run:
shell: bash
env:
PYTHONUTF8: "1"
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-python-and-git
with:
python-version: ${{ matrix.python-version }}
- name: Check mercurial is working
run: |
echo -e '[ui]\nusername = Testing Mercurial<bumpversion-test-hg@github.actions>' > ~/.hgrc
hg --version
- name: Install requirements
shell: bash
run: |
uv sync -p 3.12 --group dev --group test
- name: Test
run: uv run pytest --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: test-reports/coverage.xml
flags: python-${{ matrix.python-version }}
verbose: true # optional (default = false)
env_vars: OS,PYTHON
# Upload to Test PyPI.
release-test-pypi:
name: Publish in-dev package to test.pypi.org
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- uses: ./.github/actions/setup-python-and-git
with:
python-version: "3.12"
- name: Install requirements
shell: bash
run: |
uv sync -p 3.12 --group dev
- name: Set dev version
shell: bash
run: |
export PR_NUMBER=$(gh pr view --json number -q .number || echo "")
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
echo "::notice::PR_NUMBER is: ${PR_NUMBER}"
uv run bump-my-version bump dev bumpversion/__init__.py --no-commit --no-tag --no-configured-files -v
- name: Package
shell: bash
run: |
uv build
- name: Upload package to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/