From 87ae07f6d42d271b4bc3f377d8b13bd52123beb2 Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Mon, 2 Dec 2024 10:52:10 -0500 Subject: [PATCH 1/4] docs: updates python semantic release link The existing link is no longer reachable and returns a 404 Signed-off-by: Jennifer Power --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fdd4c9759..049d30103 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,7 +43,7 @@ Upon approval from reviewer(s), the working copy is squashed and merged into the Upon a cadence established by the maintainers, the develop branch is merged into the main branch and a new release is uniquely numbered and pushed to [pypi](https://pypi.org/project/compliance-trestle/). `trestle` employs `semantic release` to automatically control release numbering. -Code deliveries should be tagged with prefix `fix:` for changes that are bug fixes or `feat:` for changes that are new features. See [allowed_tags](https://python-semantic-release.readthedocs.io/en/latest/commit-parsing.html#:~:text=The%20default%20configuration%20options%20for%20semantic_release.commit_parser.AngularCommitParser%20are%3A) for a list of supported tags. +Code deliveries should be tagged with prefix `fix:` for changes that are bug fixes or `feat:` for changes that are new features. See [allowed_tags](https://python-semantic-release.readthedocs.io/en/latest/commit_parsing.html#commit-parser-builtin-angular) for a list of supported tags. ### Trestle merging and release workflow From 332488f48787a8573831a81e02160df6c2070d17 Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Mon, 2 Dec 2024 11:10:28 -0500 Subject: [PATCH 2/4] ci: updates github variable reference to use github.event.ref An action/runner bug causes GITHUB_REF to be empty in some instances. See issue #2788 on actions/runner. Signed-off-by: Jennifer Power --- .github/workflows/docs-update.yml | 4 +++- .github/workflows/python-test.yml | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-update.yml b/.github/workflows/docs-update.yml index 11a660bb7..415d4bc72 100644 --- a/.github/workflows/docs-update.yml +++ b/.github/workflows/docs-update.yml @@ -37,8 +37,10 @@ jobs: with: python-version: ${{ needs.set-versions.outputs.max }} - id: versions + env: + REF: ${{ github.event.ref }} run: | - mike_version=$(python ./scripts/mike_version_parse.py ${{ env.GITHUB_REF }}) + mike_version=$(python ./scripts/mike_version_parse.py "$REF") echo "mver=$mike_version" >> $GITHUB_OUTPUT deploy-docs: runs-on: ubuntu-latest diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index dd50083a7..793d039d1 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -71,6 +71,12 @@ jobs: - name: Check if dirty (mkdocs) run: | make check-for-changes + - name: Test mike script + env: + REF: ${{ github.event.ref }} + run: | + mike_version=$(python ./scripts/mike_version_parse.py "$REF") + [[ -z "$mike_version" ]] && echo "mike_version is empty" && exit 1 || echo "$mike_version" # This test simulates what it is like for a user to install trestle today. # Coverage cannot be calculated as part of From 84c44b60ef16d47d285dd97ddcafd917ea3eaeba Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Mon, 2 Dec 2024 14:13:44 -0500 Subject: [PATCH 3/4] fix: updates python test to only check the mike script on PRs Signed-off-by: Jennifer Power --- .github/workflows/python-test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 793d039d1..2ed6f6412 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -72,11 +72,14 @@ jobs: run: | make check-for-changes - name: Test mike script + # Only run this check on PRs to develop to check that the + # script produce the proper version of latest. + if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.base.ref , 'develop') }} env: - REF: ${{ github.event.ref }} + REF: ${{ github.event.pull_request.base.ref }} run: | mike_version=$(python ./scripts/mike_version_parse.py "$REF") - [[ -z "$mike_version" ]] && echo "mike_version is empty" && exit 1 || echo "$mike_version" + [[ "$mike_version" == latest ]] && echo "mike_version should be latest" && exit 1 || echo "$mike_version" # This test simulates what it is like for a user to install trestle today. # Coverage cannot be calculated as part of From 50438f36ffec6a8f818809633937017885a95fe7 Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Mon, 2 Dec 2024 14:51:13 -0500 Subject: [PATCH 4/4] chore: removes the mike version check in python-test Testing locally would be simpler in this case. Signed-off-by: Jennifer Power --- .github/workflows/python-test.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 2ed6f6412..dd50083a7 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -71,15 +71,6 @@ jobs: - name: Check if dirty (mkdocs) run: | make check-for-changes - - name: Test mike script - # Only run this check on PRs to develop to check that the - # script produce the proper version of latest. - if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.base.ref , 'develop') }} - env: - REF: ${{ github.event.pull_request.base.ref }} - run: | - mike_version=$(python ./scripts/mike_version_parse.py "$REF") - [[ "$mike_version" == latest ]] && echo "mike_version should be latest" && exit 1 || echo "$mike_version" # This test simulates what it is like for a user to install trestle today. # Coverage cannot be calculated as part of