Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/check-version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check Version Bump

on:
pull_request:
branches: [main]

jobs:
check-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get target branch version
id: target_version
run: |
git fetch origin main
TARGET_VERSION=$(git show origin/main:pyproject.toml | grep '^version' | cut -d'"' -f2)
echo "target_version=$TARGET_VERSION" >> $GITHUB_OUTPUT

- name: Get PR branch version
id: pr_version
run: |
PR_VERSION=$(grep '^version' pyproject.toml | cut -d'"' -f2)
echo "pr_version=$PR_VERSION" >> $GITHUB_OUTPUT

- name: Compare versions
run: |
if [ "${{ steps.target_version.outputs.target_version }}" = "${{ steps.pr_version.outputs.pr_version }}" ]; then
echo "::error::Version in pyproject.toml has not been updated. Please bump the version before merging."
exit 1
fi
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "pytest-xdist-load-testing"
description = "xdist scheduler to repeately run tests"
version = "0.1.0"
version = "0.1.1"
readme = "README.md"
requires-python = ">=3.9"
authors = [
Expand Down