Skip to content

Commit 4ace617

Browse files
authored
Improve workflow readability with better names, and add release summaries (#57)
* Rename connect-integration-tests jobs to be shorter * Add special release logic for 0.0.0 * Remove unnecessary test summary * Refactor should_release to also output to GitHub summary * Change one app to force CI to run tests and release logic * Move release summary containing LATEST_VERSION into the normal comparison logic block * Update contributing guide to mirror GitHub Summary behavior * Revert "Change one app to force CI to run tests and release logic" This reverts commit 738cef0. * Fix simple-extension-release logic to not run if no integration tests ran
1 parent 00d72db commit 4ace617

File tree

4 files changed

+57
-59
lines changed

4 files changed

+57
-59
lines changed

.github/actions/release-extension/action.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,34 @@ runs:
4141
- name: Check if manifest has newer version
4242
id: should_release
4343
run: |
44-
echo "The manifest version is '$MANIFEST_VERSION' and the released version is '$LATEST_VERSION'"
45-
HIGHER_VERSION=$(semver "$MANIFEST_VERSION" "$LATEST_VERSION" | tail -n 1)
46-
if [ "$MANIFEST_VERSION" = "$HIGHER_VERSION" ] && [ "$MANIFEST_VERSION" != "$LATEST_VERSION" ]; then
47-
echo "🚀 Will release! The manifest version is greater than the released version."
48-
echo "should_release=true" >> "$GITHUB_OUTPUT"
49-
else
50-
echo "😴 Holding back from release: The manifest version is not greater than the released version."
44+
# Add the extension name to the summary header for clarity
45+
echo "# Extension: ${{ inputs.extension-name }}" >> $GITHUB_STEP_SUMMARY
46+
echo "" >> $GITHUB_STEP_SUMMARY
47+
48+
if [ "$MANIFEST_VERSION" = "0.0.0" ]; then
49+
MESSAGE="⚠️ Version 0.0.0 is reserved and will never be released."
50+
echo "$MESSAGE"
51+
echo "$MESSAGE" >> $GITHUB_STEP_SUMMARY
5152
echo "should_release=false" >> "$GITHUB_OUTPUT"
53+
else
54+
# Normal version comparison logic
55+
VERSION_INFO="The manifest version is '$MANIFEST_VERSION' and the released version is '$LATEST_VERSION'"
56+
echo "$VERSION_INFO"
57+
echo "$VERSION_INFO" >> $GITHUB_STEP_SUMMARY
58+
echo "" >> $GITHUB_STEP_SUMMARY
59+
60+
HIGHER_VERSION=$(semver "$MANIFEST_VERSION" "$LATEST_VERSION" | tail -n 1)
61+
if [ "$MANIFEST_VERSION" = "$HIGHER_VERSION" ] && [ "$MANIFEST_VERSION" != "$LATEST_VERSION" ]; then
62+
MESSAGE="🚀 Will release! The manifest version is greater than the released version."
63+
echo "$MESSAGE"
64+
echo "$MESSAGE" >> $GITHUB_STEP_SUMMARY
65+
echo "should_release=true" >> "$GITHUB_OUTPUT"
66+
else
67+
MESSAGE="😴 Holding back from release: The manifest version is not greater than the released version."
68+
echo "$MESSAGE"
69+
echo "$MESSAGE" >> $GITHUB_STEP_SUMMARY
70+
echo "should_release=false" >> "$GITHUB_OUTPUT"
71+
fi
5272
fi
5373
shell: bash
5474

.github/workflows/connect-integration-tests.yml

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717

1818
jobs:
1919
# Determine the Connect versions to test against
20-
setup-integration-test:
20+
setup-test:
2121
runs-on: ubuntu-latest
2222
timeout-minutes: 5
2323
outputs:
@@ -35,16 +35,16 @@ jobs:
3535
echo "versions=$versions" >> "$GITHUB_OUTPUT"
3636
3737
# Run the Connect integration tests for each extension against each Connect version
38-
connect-integration-test:
38+
test:
3939
runs-on: ubuntu-latest
4040
timeout-minutes: 15 # Max time to run the integration tests
41-
needs: setup-integration-test
41+
needs: setup-test
4242
strategy:
4343
# Do not fail fast so all extensions and Connect versions are processed
4444
fail-fast: false
4545
matrix:
4646
extension: ${{ fromJson(inputs.extensions) }}
47-
connect_version: ${{ fromJson(needs.setup-integration-test.outputs.versions) }}
47+
connect_version: ${{ fromJson(needs.setup-test.outputs.versions) }}
4848
steps:
4949
- uses: actions/checkout@v4
5050

@@ -55,6 +55,7 @@ jobs:
5555
connect-version: ${{ matrix.connect_version }}
5656
connect-license: ${{ secrets.CONNECT_LICENSE }}
5757

58+
# Upload the test report XML files as artifacts for use by downstream jobs
5859
- uses: actions/upload-artifact@v4
5960
if: |
6061
always() &&
@@ -65,42 +66,9 @@ jobs:
6566
path: integration/reports/*.xml
6667
retention-days: 7
6768

68-
# Analyses the test result files and publishes the results on the GitHub Actions job summary page
69-
integration-test-report:
70-
needs: connect-integration-test
71-
runs-on: ubuntu-latest
72-
timeout-minutes: 5
73-
# Create a matrix so each extension gets its own test report
74-
strategy:
75-
fail-fast: false
76-
matrix:
77-
extension: ${{ fromJson(inputs.extensions) }}
78-
permissions:
79-
checks: write
80-
pull-requests: write
81-
# Only run if tests weren't skipped or cancelled
82-
if: |
83-
always() &&
84-
!contains(needs.connect-integration-test.result, 'skipped') &&
85-
!contains(needs.connect-integration-test.result, 'cancelled')
86-
steps:
87-
- uses: actions/download-artifact@v4
88-
id: download
89-
with:
90-
path: artifacts
91-
pattern: "${{ matrix.extension }}-*-test-report"
92-
93-
- uses: EnricoMi/publish-unit-test-result-action@v2
94-
if: ${{ steps.download.outputs.download-path != '' }}
95-
with:
96-
check_name: "Integration test results - ${{ matrix.extension }}"
97-
comment_mode: off
98-
files: "artifacts/**/*.xml"
99-
report_individual_runs: true
100-
10169
# Using the XML test reports provide a matrix of extensions that passed all of the Connect integration tests
10270
collect-results:
103-
needs: [connect-integration-test, setup-integration-test]
71+
needs: [test, setup-test]
10472
runs-on: ubuntu-latest
10573
timeout-minutes: 5
10674
outputs:
@@ -116,7 +84,7 @@ jobs:
11684
- id: collect
11785
run: |
11886
# Validate inputs first
119-
all_versions='${{ needs.setup-integration-test.outputs.versions }}'
87+
all_versions='${{ needs.setup-test.outputs.versions }}'
12088
extensions='${{ inputs.extensions }}'
12189
12290
if [[ -z "$all_versions" || -z "$extensions" ]]; then

.github/workflows/extensions.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,13 @@ jobs:
121121
simple-extension-release:
122122
runs-on: ubuntu-latest
123123
needs: [simple-extension-connect-integration-tests]
124-
if: always()
124+
# Only run if connect integration tests actually ran and produced valid output
125+
if: ${{
126+
always() &&
127+
needs.simple-extension-connect-integration-tests.result != 'skipped' &&
128+
needs.simple-extension-connect-integration-tests.result != 'canceled' &&
129+
needs.simple-extension-connect-integration-tests.outputs.successful_extensions != '[]'
130+
}}
125131
env:
126132
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
127133
strategy:

contributing.qmd

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,25 +197,29 @@ Connect Gallery.
197197
### Checking if your extension will release
198198

199199
If you would like to check if merging a pull request will trigger a new release
200-
you can do that by looking at the logs for the GitHub Actions.
200+
you can do that by looking in the GitHub Actions summary. Click on the "Checks"
201+
tab for a Pull Request and then click on the Extension Workflow run and the
202+
summary will be displayed below the workflow graph.
201203

202-
Click on the "Checks" tab for a Pull Request and look at the Extension Workflow
203-
run.
204+
It will either say:
204205

205-
Click on the Job related to the content being updated and view the logs for the
206-
`/./.github/actions/release-extension` action.
206+
::: {.border}
207+
The manifest version is '1.1.0' and the released version is '1.0.0'
208+
🚀 Will release! The manifest version is greater than the released version.
209+
:::
207210

208-
It will either say:
211+
or:
209212

210-
> The manifest version is '1.1.0' and the released version is '1.0.0'
211-
>
212-
> 🚀 Will release! The manifest version is greater than the released version.
213+
::: {.border}
214+
The manifest version is '1.0.0' and the released version is '1.0.0'
215+
😴 Holding back from release: The manifest version is not greater than the released version.
216+
:::
213217

214218
or:
215219

216-
> The manifest version is '1.0.0' and the released version is '1.0.0'
217-
>
218-
>😴 Holding back from release: The manifest version is not greater than the released version.
220+
::: {.border}
221+
⚠️ Version 0.0.0 is reserved and will never be released.
222+
:::
219223

220224
## Manually testing content
221225

0 commit comments

Comments
 (0)