Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0766c48cc0 | |||
| 32d825e441 |
@@ -10,94 +10,14 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
# Only one E2E run at a time: the shared E2E_RELEASE (headlamp-e2e) in
|
|
||||||
# headlamp-dev cannot be shared across concurrent runs.
|
|
||||||
# cancel-in-progress: false (queue, don't cancel) — cancelling in-flight
|
|
||||||
# runs may skip the if: always() teardown, leaving dangling cluster resources.
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: e2e-${{ github.repository }}
|
group: e2e-${{ github.repository }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
env:
|
|
||||||
E2E_NAMESPACE: headlamp-dev
|
|
||||||
E2E_RELEASE: headlamp-e2e
|
|
||||||
# Pin to a known-good Headlamp version. Using :latest is risky because
|
|
||||||
# the tag can change between CI runs, causing flaky failures when a newer
|
|
||||||
# image is pulled on some nodes but not others (IfNotPresent pull policy).
|
|
||||||
# Update this when Headlamp is upgraded in production (kube-system).
|
|
||||||
HEADLAMP_VERSION: v0.40.1
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2e:
|
e2e:
|
||||||
runs-on: runners-privilegedescalation
|
uses: privilegedescalation/.github/.github/workflows/plugin-e2e.yaml@main
|
||||||
timeout-minutes: 15
|
with:
|
||||||
|
node-version: '22'
|
||||||
steps:
|
headlamp-version: v0.40.1
|
||||||
- name: Checkout
|
e2e-namespace: headlamp-dev
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v6
|
|
||||||
with:
|
|
||||||
node-version: '22'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Setup kubectl
|
|
||||||
uses: azure/setup-kubectl@v4
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Build plugin
|
|
||||||
run: npx @kinvolk/headlamp-plugin build
|
|
||||||
|
|
||||||
- name: Deploy E2E Headlamp instance
|
|
||||||
run: scripts/deploy-e2e-headlamp.sh
|
|
||||||
|
|
||||||
- name: Load E2E environment
|
|
||||||
run: |
|
|
||||||
if [ -f .env.e2e ]; then
|
|
||||||
cat .env.e2e >> "$GITHUB_ENV"
|
|
||||||
else
|
|
||||||
echo "::error::deploy-e2e-headlamp.sh did not produce .env.e2e"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Install Playwright browsers
|
|
||||||
run: npx playwright install --with-deps chromium
|
|
||||||
|
|
||||||
- name: Run E2E tests
|
|
||||||
run: npm run e2e
|
|
||||||
env:
|
|
||||||
HEADLAMP_URL: ${{ env.HEADLAMP_URL }}
|
|
||||||
HEADLAMP_TOKEN: ${{ env.HEADLAMP_TOKEN }}
|
|
||||||
|
|
||||||
- name: Collect deployment diagnostics on failure
|
|
||||||
if: failure()
|
|
||||||
run: |
|
|
||||||
echo "=== Pod state ==="
|
|
||||||
kubectl get pods -n "$E2E_NAMESPACE" -l "app.kubernetes.io/instance=$E2E_RELEASE" 2>&1 || true
|
|
||||||
echo "=== Pod describe ==="
|
|
||||||
kubectl describe pods -n "$E2E_NAMESPACE" -l "app.kubernetes.io/instance=$E2E_RELEASE" 2>&1 || true
|
|
||||||
echo "=== Recent namespace events ==="
|
|
||||||
kubectl get events -n "$E2E_NAMESPACE" --sort-by='.lastTimestamp' 2>&1 | tail -20 || true
|
|
||||||
|
|
||||||
- name: Teardown E2E instance
|
|
||||||
if: always()
|
|
||||||
run: scripts/teardown-e2e-headlamp.sh
|
|
||||||
|
|
||||||
- name: Upload Playwright report
|
|
||||||
uses: actions/upload-artifact@v7
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: playwright-report
|
|
||||||
path: playwright-report/
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
- name: Upload test results
|
|
||||||
uses: actions/upload-artifact@v7
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: test-results
|
|
||||||
path: test-results/
|
|
||||||
retention-days: 7
|
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
{
|
|
||||||
"config": {
|
|
||||||
// Line length — not enforced for docs with code examples
|
|
||||||
"MD013": false,
|
|
||||||
// First line heading — files use YAML frontmatter, not headings
|
|
||||||
"MD041": false,
|
|
||||||
// Emphasis as heading — common pattern for Option 1/2/3 sections
|
|
||||||
"MD036": false,
|
|
||||||
// No duplicate heading — changelog files repeat section names intentionally
|
|
||||||
"MD024": false,
|
|
||||||
// Fenced code language — not always applicable for diagram blocks
|
|
||||||
"MD040": false,
|
|
||||||
// Table column style — table alignment is visual, not semantic
|
|
||||||
"MD060": false,
|
|
||||||
// Ordered list item prefix — number resets are intentional in documents
|
|
||||||
"MD029": false,
|
|
||||||
// No inline HTML — each elements are valid in valid Markdown
|
|
||||||
"MD033": false,
|
|
||||||
// List marker space — spacing after list markers varies by editor
|
|
||||||
"MD030": false,
|
|
||||||
// Blanks around headings — not always needed in compact docs
|
|
||||||
"MD022": false,
|
|
||||||
// Blanks around lists — not always needed in compact docs
|
|
||||||
"MD032": false,
|
|
||||||
// Blanks around fences — not always needed between adjacent blocks
|
|
||||||
"MD031": false,
|
|
||||||
// Multiple blanks — editor artifacts, not semantic
|
|
||||||
"MD012": false,
|
|
||||||
// Single title — files may have multiple H1 sections
|
|
||||||
"MD025": false,
|
|
||||||
// Trailing spaces — editor artifacts
|
|
||||||
"MD009": false,
|
|
||||||
// Bare URLs — URL shortening not always needed
|
|
||||||
"MD034": false,
|
|
||||||
// Single trailing newline — editor artifacts
|
|
||||||
"MD047": false,
|
|
||||||
// Trailing punctuation — heading punctuation is intentional
|
|
||||||
"MD026": false,
|
|
||||||
// Space in emphasis — double-asterisk bold spacing varies by renderer
|
|
||||||
"MD037": false,
|
|
||||||
// No hard tabs — some generated docs use tabs for indentation
|
|
||||||
"MD010": false,
|
|
||||||
// Code block style — generated docs may use inconsistent styles
|
|
||||||
"MD046": false,
|
|
||||||
// Comment style — generated docs have no comments
|
|
||||||
"MD048": false,
|
|
||||||
// Commands show output — shell examples intentionally show only commands
|
|
||||||
"MD014": false
|
|
||||||
},
|
|
||||||
"ignores": [
|
|
||||||
"docs/api-reference/generated/**"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
docs/api-reference/generated/**
|
|
||||||
+2
-1
@@ -45,6 +45,7 @@
|
|||||||
"overrides": {
|
"overrides": {
|
||||||
"tar": "^7.5.11",
|
"tar": "^7.5.11",
|
||||||
"undici": "^7.24.3",
|
"undici": "^7.24.3",
|
||||||
"lodash": ">=4.18.0"
|
"lodash": ">=4.18.0",
|
||||||
|
"elliptic": ">=6.6.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user