Skip to content

Commit a940d23

Browse files
committed
Refactor workflows and coverage reporting
Updated GitHub Actions to improve release conditions, refine coverage reporting with added precision, and streamline version bump process. Removed unused version definitions in `__init__.py`. Signed-off-by: Steven K <steven@pointcircle.com>
1 parent 78bbdb8 commit a940d23

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ jobs:
203203
- name: Combine Report Coverage
204204
run: |
205205
coverage combine coverage-*/.coverage
206-
coverage report
206+
coverage report --precision=1 --sort=cover --skip-covered --skip-empty
207207
coverage xml
208208
209209
- name: Upload coverage to Codecov
@@ -215,18 +215,19 @@ jobs:
215215

216216
release:
217217
name: Release
218-
if: ${{ github.event_name != 'schedule' }}
219218
runs-on: ubuntu-latest
220219
needs: ['outdated', 'black', 'pre-commit', 'security', 'tests', 'coverage']
220+
if: github.ref == 'refs/heads/master' # Only run on master
221221
permissions: write-all
222222
outputs:
223223
bumped: ${{ steps.release.outputs.bumped }}
224224
bump_version: ${{ steps.release.outputs.bump_version }}
225-
bump_sha: ${{ steps.release.outputs.bump_sha }}
225+
bump_sha: ${{ steps.release.outputs.bump_sha }}
226226
steps:
227227
- uses: actions/checkout@v4
228228
with:
229-
fetch-depth: 0
229+
ref: master
230+
fetch-depth: 0 # Need full history for git tags and version calculation
230231
- uses: actions/setup-python@v5
231232
with:
232233
python-version: "3.13"

django_states/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
__name__ = "django_states"
99
__author__ = "Pivotal Energy Solutions"
10-
__version_info__ = (1, 7, 38)
11-
__version__ = "1.7.38"
1210
__date__ = "2014/07/22 4:47:00 PM"
1311
__credits__ = [
1412
"Jonathan Slenders",

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ Thanks = "https://saythanks.io/to/rh0dium"
5454

5555
[tool.hatch.version]
5656
source = "vcs"
57+
fallback-version = "0.0.0.0"
58+
59+
[tool.hatch.metadata]
60+
allow-direct-references = true
5761

5862
[tool.hatch.build.targets.sdist]
5963
include = [
@@ -100,6 +104,5 @@ sort = "cover"
100104

101105
[tool.bumper]
102106
exclude = [".idea", ".github", "demo_app"]
103-
version_files = ["django_states/__init__.py"]
104107
repo = "pivotal-energy-solutions/django-states2"
105108
report = "out.json"

0 commit comments

Comments
 (0)