-
Notifications
You must be signed in to change notification settings - Fork 563
CNTRLPLANE-4043: ci(e2e): add CI workflow to verify e2e compilation on PRs #9305
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: E2E Compile (Reusable) | ||
|
|
||
| on: | ||
| workflow_call: | ||
| push: | ||
| branches: | ||
| - main | ||
| - release-4.22 | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| changes: | ||
| name: Detect Changes | ||
| runs-on: arc-runner-set | ||
| timeout-minutes: 5 | ||
| outputs: | ||
| run_e2e: ${{ steps.changes.outputs.run_e2e }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Check for non-contrib changes | ||
| id: changes | ||
| env: | ||
| BASE_REF: ${{ github.base_ref }} | ||
| EVENT_BEFORE: ${{ github.event.before }} | ||
| EVENT_SHA: ${{ github.sha }} | ||
| run: | | ||
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | ||
| echo "run_e2e=true" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| elif [ "${{ github.event_name }}" = "pull_request" ]; then | ||
| FILES=$(git diff --name-only "origin/$BASE_REF...HEAD") | ||
| else | ||
| if [ "$EVENT_BEFORE" = "0000000000000000000000000000000000000000" ]; then | ||
| echo "run_e2e=true" >> "$GITHUB_OUTPUT" | ||
| exit 0 | ||
| fi | ||
| FILES=$(git diff --name-only "$EVENT_BEFORE..$EVENT_SHA") | ||
| fi | ||
| if echo "$FILES" | grep -qvE '^(contrib|\.github|docs)/'; then | ||
| echo "run_e2e=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "run_e2e=false" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| e2e-compile: | ||
| name: E2E Compile | ||
| needs: changes | ||
| if: needs.changes.outputs.run_e2e == 'true' | ||
| runs-on: arc-runner-set | ||
| timeout-minutes: 30 | ||
| env: | ||
| GOMODCACHE: /tmp/go-mod-cache | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | ||
| env: | ||
| HOME: /tmp | ||
| with: | ||
| go-version-file: go.mod | ||
| cache: false | ||
| - name: Compile E2E tests | ||
| run: make e2e | ||
|
bryan-cox marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| name: E2E Compile | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - release-4.22 | ||
| workflow_dispatch: {} | ||
|
|
||
| jobs: | ||
| e2e-compile: | ||
| uses: openshift/hypershift/.github/workflows/e2e-compile-reusable.yaml@main | ||
| permissions: | ||
| contents: read |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/hypershift
Length of output: 158
🏁 Script executed:
Repository: openshift/hypershift
Length of output: 5438
🌐 Web query:
actionlint custom self-hosted runner label unknown runner label configuration💡 Result:
To resolve the "unknown runner label" error in actionlint for custom self-hosted runner labels, you must explicitly declare these labels in an actionlint configuration file [1][2][3]. 1. Create a configuration file named.github/actionlint.yaml (or.github/actionlint.yml) in your repository root [4][5]. 2. Add a self-hosted-runner section with a labels list to define your custom labels [4][6]:
yaml # .github/actionlint.yaml self-hosted-runner: labels: - my-custom-label - another-label-*Supporting Information: - Glob Pattern Support: You can use glob patterns (supported by path.Match) in the labels list to match multiple dynamic labels (e.g., prefix-*) [4][7][8]. - Automatic Generation: You can generate a default configuration file by running the actionlint command with the -init-config flag [4][5]. - Important Note: Only use this configuration for genuine custom self-hosted runner labels [9]. If actionlint reports an "unknown" label for a standard GitHub-hosted runner, it is often a sign that you should update your actionlint version instead of adding it to your config [10].Citations:
🏁 Script executed:
Repository: openshift/hypershift
Length of output: 2051
🏁 Script executed:
Repository: openshift/hypershift
Length of output: 324
🏁 Script executed:
Repository: openshift/hypershift
Length of output: 2367
Move
.actionlint.yamlto.github/actionlint.yaml.The label is already declared, but actionlint only auto-loads the configuration from
.github/actionlint.yaml. This change will stop the unknown-label errors.🧰 Tools
🪛 actionlint (1.7.12)
[error] 16-16: label "arc-runner-set" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-intel", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
🤖 Prompt for AI Agents
Source: Linters/SAST tools