Skip to content

Commit 276f9e8

Browse files
authored
[NEW] v1.12.2 Improved Regression Testing
Release Version '1.12.2' into 'master' Branch
2 parents df69397 + eac2665 commit 276f9e8

17 files changed

+349
-112
lines changed

.coveragerc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[run]
22
source =
33
cookiecutter_python
4-
tests
54

65
[report]
76
show_missing = true

.github/workflows/auto-prod.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,20 @@ jobs:
7878
run: git commit -am "${{ steps.rc_msg.outputs.RC_MSG }}"
7979

8080
## Trigger (gitops) Release Candidate 'Stress Tests' ##
81+
- name: Push '${{ env.RELEASE }}' Branch, to sync RC Sem Ver in Remote
82+
run: git push
83+
8184
- name: "Trigger Release Candidate - Stress Tests"
8285
env:
8386
rc_tag: 'v${{ steps.rc_sem_ver.outputs.RC_VER }}'
8487
run: |
85-
echo "[STEP]: Tag Commit: ${rc_tag}"
86-
git tag -d "$rc_tag"; git push --delete origin "$rc_tag"; git tag "$rc_tag" && git push origin "$rc_tag"
88+
echo "[STEP]: Tag Local: ${rc_tag}"
89+
git tag -d "$rc_tag" || echo "Ensured Local Tag $rc_tag does not exist"
90+
git tag "$rc_tag"
91+
echo
92+
echo "[STEP]: Tag Remote: ${rc_tag}"
93+
git push --delete origin "$rc_tag" || echo "Ensured Remote Tag $rc_tag does not exist"
94+
git push origin "$rc_tag"
8795
echo
8896
echo " -> Pushed tag $rc_tag"
8997
echo

.github/workflows/load-to-rt.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# export tt='board-rt'
1010
# OR
11-
# export tt='boarding-n-auto-release'
11+
# export tt='boarding-auto'
1212
# for Automatically merging Release Train in Release
1313

1414
# git tag -d "$tt"; git push --delete origin "$tt"; git tag "$tt" && git push origin "$tt"
@@ -26,13 +26,14 @@ jobs:
2626
env:
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2828
TRAIN: 'release-train'
29-
BOARDING: ${{ github.event.ref == 'refs/tags/auto-release' && 'boarding-n-auto-release' || 'boarding' }}
29+
BOARDING: ${{ github.event.ref == 'refs/tags/auto-release' && 'boarding-auto' || 'boarding' }}
3030
MAIN_BRANCH: 'master'
3131
steps:
3232
- uses: actions/checkout@v4
3333
with:
3434
fetch-depth: 0 # 0 indicates all history for all branches and tags.
3535
set-safe-directory: '' # `git config --global --add safe.directory <path>`
36+
# GH_TOKEN should be a PAT, that allows to trigger Actions Workflow (default GITHUB_TOKEN cannot invoke Worklflows!)
3637
token: '${{ secrets.GH_TOKEN }}'
3738

3839
- run: git log --graph --decorate --color --all --stat

.github/workflows/merge-rt-in-release.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,47 @@
88
# 2. Test
99
# 3. Merge
1010

11+
# Tested to Trigger when a developer merges PR from github UI
12+
# to test if triggers on programmatic merge: `gh pr merge boarding-auto --auto --delete-branch --squash`
13+
14+
name: Merge RT in Release
1115
# Release Train (RT) has All changes needed for Release
1216
# We Test RT, and do auto merge if CI Checks Pass
1317

1418
on:
1519
pull_request:
20+
# When a pull request merges, the pull request is automatically closed.
21+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-pull_request-workflow-when-a-pull-request-merges
1622
types: [closed]
17-
# push:
18-
# tags:
19-
# - merge-rt-in-release
23+
branches: # ALLOWED Base Branches
24+
- release-train
2025

2126
jobs:
27+
# RUN Job when 'boarding-auto --> 'release-train' PR is merged
2228
merge_rt_in_release:
23-
# When 'boarding-n-auto-release --> 'release-train' PR is merged
24-
if: ${{ github.event.pull_request.merged == true &&
25-
github.event.pull_request.head.ref == 'boarding-n-auto-release' && \
26-
github.event.pull_request.base.ref == 'release-train' }}
29+
# ALLOWED Head Branches
30+
# if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'boarding-auto')
31+
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
32+
2733
runs-on: ubuntu-latest
2834
env:
2935
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3036
TRAIN: 'release-train'
3137
RELEASE_BR: 'release'
3238
MAIN_BR: 'master'
3339
steps:
40+
- run: "echo \"[DEBUG] HEAD: '${{ github.head_ref }}', should be 'boarding-auto'\""
41+
- run: "echo \"[DEBUG] BASE: '${{ github.base_ref }}', should be 'release-train'\""
42+
3443
- uses: actions/checkout@v4
3544
with:
3645
fetch-depth: 0 # 0 indicates all history for all branches and tags.
3746
set-safe-directory: '' # `git config --global --add safe.directory <path>`
3847
token: '${{ secrets.GH_TOKEN }}'
3948

4049
# Track the remote branches
41-
- run: git branch --track "${{ env.TRAIN }}" "origin/${{ env.TRAIN }}"
42-
- run: git branch --track "${{ env.RELEASE_BR }}" "origin/${{ env.RELEASE_BR }}"
50+
- run: git branch --track "${{ env.TRAIN }}" "origin/${{ env.TRAIN }}" || echo "Branch '${{ env.TRAIN }}' already exists"
51+
- run: git branch --track "${{ env.RELEASE_BR }}" "origin/${{ env.RELEASE_BR }}" || echo "Branch '${{ env.RELEASE_BR }}' already exists"
4352

4453
############## PR ##############
4554
- name: "Create PR 'head': ${{ env.TRAIN }} --> 'base': ${{ env.RELEASE_BR }}"

CHANGELOG.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,38 @@ Changelog
33
=========
44

55

6+
1.12.2 (2024-02-07)
7+
===================
8+
9+
**Regression and Backwards Compatibility - Tests**
10+
11+
This Release features the addition of Automated Regression Test for 'Generator Docs Default Settings'.
12+
By Default Generator v2.x promises that upon invocation, the generated Project with be configured for
13+
| Doc Builds with Sphinx and RTD Python3.8.
14+
15+
The Test will fail if Defaults change.
16+
If Test is fixed, by updating assertion in Test Code, then then this is evidence that if we release these future changes,
17+
they possibly introduce "breaking changes".
18+
19+
Also, we add a new Test on the Dialog Prompts to verify that they prompt the User for each and every one of the Cookiecutter Tempalte Variables.
20+
If this test fails, then the Dialog System and the Cookiecutter Tempalte Vars are out of Sync, which should be addressed, preventing a Bug from shipping Code with the 2 components being NOT synced.
21+
22+
From this Relase onward, we also start measuring Code Coverage only on Production Code.
23+
We only measure the 'src' dir, and stop measuring Test Code, in 'tests' dir.
24+
25+
Changes
26+
^^^^^^^
27+
28+
test
29+
""""
30+
- verify Gen Project configured with Sphinx and RTD Py3.8, as advertised Defaults
31+
- verify prompts user for each and everyone of Cookiecutter Template Variables
32+
33+
release
34+
"""""""
35+
- bump version to 1.12.2
36+
37+
638
1.12.1 (2024-01-29)
739
===================
840

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ Free/Libre and Open Source Software (FLOSS)
275275

276276
.. Github Releases & Tags
277277
278-
.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v1.12.1/master?color=blue&logo=github
278+
.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v1.12.2/master?color=blue&logo=github
279279
:alt: GitHub commits since tagged version (branch)
280-
:target: https://github.com/boromir674/cookiecutter-python-package/compare/v1.12.1..master
280+
:target: https://github.com/boromir674/cookiecutter-python-package/compare/v1.12.2..master
281281

282282
.. |commits_since_latest_github_release| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/latest?color=blue&logo=semver&sort=semver
283283
:alt: GitHub commits since latest release (by SemVer)

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
author = 'Konstantinos Lampridis'
3131

3232
# The full version, including alpha/beta/rc tags
33-
release = '1.12.1'
33+
release = '1.12.2'
3434

3535
# -- General configuration ---------------------------------------------------
3636

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ build-backend = "poetry.core.masonry.api"
1010
## Also renders on pypi as 'subtitle'
1111
[tool.poetry]
1212
name = "cookiecutter_python"
13-
version = "1.12.1"
13+
version = "1.12.2"
1414
description = "1-click Generator of Python Project, from Template with streamlined \"DevOps\" using a powerful CI/CD Pipeline."
1515
authors = ["Konstantinos Lampridis <k.lampridis@hotmail.com>"]
1616
maintainers = ["Konstantinos Lampridis <k.lampridis@hotmail.com>"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = '1.12.1'
1+
__version__ = '1.12.2'
22

33
from . import _logging # noqa

src/cookiecutter_python/handle/dialogs/lib/interpreters_dialog.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)