Skip to content

Commit 3378df3

Browse files
committed
Integration test improvements and release workflow updates
1 parent b3bb5d3 commit 3378df3

File tree

7 files changed

+721
-561
lines changed

7 files changed

+721
-561
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ message = [RELEASE] Bump version: {current_version} → {new_version}
77

88
[bumpversion:file:pyproject.toml]
99
search = version = "{current_version}"
10-
replace = version = "{new_version}"
10+
replace = version = "{new_version}"

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ jobs:
6868
LABELLERR_CLIENT_ID: ${{ secrets.LABELLERR_CLIENT_ID }}
6969
LABELLERR_TEST_EMAIL: ${{ secrets.LABELLERR_TEST_EMAIL }}
7070
run: |
71-
python -m pytest labellerr_use_case_tests.py -v
71+
make run-integration-test

.github/workflows/release.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: Release
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- develop
8-
tags:
9-
- 'v*.*.*'
105
workflow_dispatch:
116
inputs:
127
version_type:
@@ -43,7 +38,7 @@ jobs:
4338
if: ${{ !inputs.skip_tests }}
4439
strategy:
4540
matrix:
46-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
41+
python-version: ['3.9']
4742
steps:
4843
- name: Checkout code
4944
uses: actions/checkout@v4
@@ -72,7 +67,7 @@ jobs:
7267
name: Integration Tests
7368
runs-on: ubuntu-latest
7469
needs: test
75-
if: ${{ !inputs.skip_tests && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') }}
70+
# if: ${{ !inputs.skip_tests && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') }}
7671

7772
steps:
7873
- name: Checkout code
@@ -95,13 +90,13 @@ jobs:
9590
LABELLERR_CLIENT_ID: ${{ secrets.LABELLERR_CLIENT_ID }}
9691
LABELLERR_TEST_EMAIL: ${{ secrets.LABELLERR_TEST_EMAIL }}
9792
run: |
98-
python -m pytest labellerr_use_case_tests.py -v
93+
make run-integration-test
9994
10095
release:
10196
name: Create Release
10297
runs-on: ubuntu-latest
10398
needs: [test, integration-test]
104-
if: always() && (needs.test.result == 'success' || needs.test.result == 'skipped') && (needs.integration-test.result == 'success' || needs.integration-test.result == 'skipped')
99+
# if: always() && github.ref == 'refs/heads/main' && (needs.test.result == 'success' || needs.test.result == 'skipped') && (needs.integration-test.result == 'success' || needs.integration-test.result == 'skipped')
105100
outputs:
106101
version: ${{ steps.version.outputs.version }}
107102
tag: ${{ steps.version.outputs.tag }}
@@ -177,8 +172,21 @@ jobs:
177172
replace = version = "{new_version}"
178173
EOF
179174
180-
# Bump the version
181-
bump2version $BUMP_TYPE
175+
# Debug: Check git status before bump
176+
echo "=== Git status before bump ==="
177+
git status
178+
echo "=== Git diff ==="
179+
git diff
180+
echo "=== Git diff --cached ==="
181+
git diff --cached
182+
183+
# Bump the version (use --allow-dirty for release_manager branch)
184+
if [[ "${{ github.ref_name }}" == "release_manager" ]]; then
185+
echo "Using --allow-dirty for release_manager branch"
186+
bump2version --allow-dirty $BUMP_TYPE
187+
else
188+
bump2version $BUMP_TYPE
189+
fi
182190
183191
# Get the new version
184192
NEW_VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,7 @@ check-release: ## Check if everything is ready for release
5454
@echo "1. Create feature branch: git checkout -b feature/LABIMP-XXXX-release-vX.X.X"
5555
@echo "2. Update version in pyproject.toml"
5656
@echo "3. Commit: git commit -m '[LABIMP-XXXX] Prepare release vX.X.X'"
57-
@echo "4. Push and create PR to main (patch) or develop (minor)"
57+
@echo "4. Push and create PR to main (patch) or develop (minor)"
58+
59+
run-integration-test:
60+
python -m pytest labellerr_integration_tests.py -v

0 commit comments

Comments
 (0)