-
Notifications
You must be signed in to change notification settings - Fork 17
Update global-ci workflows to also be able to test UI run-ui-tests #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -401,8 +401,10 @@ jobs: | |||||||||||||||||||||||||||||
| image-pull-policy: IfNotPresent | ||||||||||||||||||||||||||||||
| analyzer-container-memory: 0 | ||||||||||||||||||||||||||||||
| analyzer-container-cpu: 0 | ||||||||||||||||||||||||||||||
| # end DRY | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Wait for Ingress and expose UI service | ||||||||||||||||||||||||||||||
| id: ui-url | ||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||
| kubectl wait \ | ||||||||||||||||||||||||||||||
| -n konveyor-tackle \ | ||||||||||||||||||||||||||||||
|
|
@@ -412,10 +414,10 @@ jobs: | |||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ingress_ip=$(kubectl get ingress/tackle -n konveyor-tackle -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||||||||||||||||||||||||||||||
| echo "ingress is ready at: ${ingress_ip}" | ||||||||||||||||||||||||||||||
| echo "UI_URL=https://${ingress_ip}" >>$GITHUB_ENV | ||||||||||||||||||||||||||||||
| # end DRY | ||||||||||||||||||||||||||||||
| echo "ui_url=https://${ingress_ip}" >>"$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Extract pull request number from inputs or PR description | ||||||||||||||||||||||||||||||
| id: ui-tests-ref | ||||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||
| body: ${{ github.event.pull_request.body }} | ||||||||||||||||||||||||||||||
|
|
@@ -425,12 +427,20 @@ jobs: | |||||||||||||||||||||||||||||
| && UI_TESTS_REF=${{ inputs.ui_tests_ref }} \ | ||||||||||||||||||||||||||||||
| || UI_TESTS_REF=refs/pull/$PULL_REQUEST_NUMBER/merge | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| echo "UI_TESTS_REF=${UI_TESTS_REF}" >>"$GITHUB_ENV" | ||||||||||||||||||||||||||||||
| echo "ref=${UI_TESTS_REF}" >>"$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||
| echo "Using UI_TESTS_REF \`${UI_TESTS_REF}\`" >>"$GITHUB_STEP_SUMMARY" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})" | ||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| repository: konveyor/tackle2-ui | ||||||||||||||||||||||||||||||
| path: tackle2-ui | ||||||||||||||||||||||||||||||
| ref: ${{ inputs.ui_tests_ref }} | ||||||||||||||||||||||||||||||
| sparse-checkout: .github/actions/run-ui-tests | ||||||||||||||||||||||||||||||
|
Comment on lines
+433
to
+439
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cd /tmp && find . -name "global-ci.yml" -o -name "*.yml" 2>/dev/null | head -20Repository: konveyor/ci Length of output: 37 🏁 Script executed: find . -path "*/.github/workflows/global-ci.yml" 2>/dev/nullRepository: konveyor/ci Length of output: 88 🏁 Script executed: ls -la .github/workflows/ 2>/dev/null | head -20Repository: konveyor/ci Length of output: 660 🏁 Script executed: cat .github/workflows/global-ci.yml | head -100Repository: konveyor/ci Length of output: 4149 🏁 Script executed: sed -n '400,450p' .github/workflows/global-ci.ymlRepository: konveyor/ci Length of output: 1950 🏁 Script executed: sed -n '1,100p' .github/workflows/global-ci.yml | grep -A 20 "ui_tests_ref"Repository: konveyor/ci Length of output: 1079 🏁 Script executed: # Let's verify what tackle2-ui repository contains to understand the context better
git log --oneline -1 2>/dev/null || echo "Not a git repo, checking workflow structure"Repository: konveyor/ci Length of output: 129 🏁 Script executed: sed -n '419,431p' .github/workflows/global-ci.ymlRepository: konveyor/ci Length of output: 661 Use extracted UI tests ref for tackle2-ui checkout instead of ui_tests_ref input. Line 438 uses Update line 438 to use the extracted ref: - name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})"
uses: actions/checkout@v4
with:
repository: konveyor/tackle2-ui
path: tackle2-ui
- ref: ${{ inputs.ui_tests_ref }}
+ ref: ${{ steps.ui-tests-ref.outputs.ref }}
sparse-checkout: .github/actions/run-ui-testsAlso update the step name to remove the now-inaccurate hardcoded input reference: - name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})"
+ name: "Checkout run-ui-tests action"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Run UI tests | ||||||||||||||||||||||||||||||
| uses: konveyor/tackle2-ui/.github/actions/run-ui-tests@main | ||||||||||||||||||||||||||||||
| uses: ./tackle2-ui/.github/actions/run-ui-tests | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| test_tags: ${{ inputs.ui_test_tags }} | ||||||||||||||||||||||||||||||
| tests_ref: ${{ env.UI_TESTS_REF }} | ||||||||||||||||||||||||||||||
| base_url: ${{ env.UI_URL }} | ||||||||||||||||||||||||||||||
| tests_ref: ${{ steps.ui-tests-ref.outputs.ref }} | ||||||||||||||||||||||||||||||
| base_url: ${{ steps.ui-url.outputs.ui_url }} | ||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: Checkout ref should use extracted PR reference, not default input.
The checkout step at line 502 uses
${{ inputs.ui_tests_ref }}(which defaults to "main"), but the extraction step immediately prior extracts a potentially different ref from the PR description (for testing modifications to the run-ui-tests action itself). This defeats the purpose of the extraction—the locally checked-out action will always be at the default ref, not the PR-specific changes.Apply this diff:
- name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})" uses: actions/checkout@v4 with: repository: konveyor/tackle2-ui path: tackle2-ui - ref: ${{ inputs.ui_tests_ref }} + ref: ${{ steps.ui-tests-ref.outputs.ref }} sparse-checkout: .github/actions/run-ui-tests📝 Committable suggestion
🤖 Prompt for AI Agents