mirror of
https://github.com/kubereboot/kured.git
synced 2026-08-19 11:26:22 +00:00
Merge pull request #1355 from evrardjp/improve_testing
Simplify testing
This commit is contained in:
@@ -38,7 +38,7 @@ jobs:
|
||||
# It is only used to make us aware of any potential security failure that
|
||||
# should trigger a bump of the image in build/.
|
||||
pr-vuln-scan:
|
||||
name: Build image and scan it against known vulnerabilities
|
||||
name: Trivy scan # Builds image and scan it against known vulnerabilities
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
@@ -68,6 +68,29 @@ jobs:
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
e2e-test-matrix:
|
||||
name: Generate e2e test matrix
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
testnames: ${{ steps.matrix.outputs.testnames }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
|
||||
- uses: jdx/mise-action@dba19683ed58901619b14f395a24841710cb4925 # v4.1.0
|
||||
with:
|
||||
version: 2026.6.1
|
||||
|
||||
- name: Generate matrix
|
||||
id: matrix
|
||||
run: |
|
||||
testnames=$(go test -list '^Test' ./tests/kind | jq -R -s -c 'split("\n") | map(select(startswith("Test")))')
|
||||
echo "testnames=${testnames}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
# This ensures the latest code works with the manifests built from tree.
|
||||
# It is useful for two things:
|
||||
# - Test manifests changes (obviously), ensuring they don't break existing clusters
|
||||
@@ -76,23 +99,13 @@ jobs:
|
||||
# - Test some features are working as expected.
|
||||
# Helm charts are _trailing_ releases, while manifests are done during development.
|
||||
e2e-manifests:
|
||||
name: End-to-End test with kured with code and manifests from HEAD
|
||||
name: e2e #End-to-End test with kured with code and manifests from HEAD
|
||||
runs-on: ubuntu-latest
|
||||
needs: e2e-test-matrix
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
testname:
|
||||
- "TestE2EWithCommand/current"
|
||||
- "TestE2EWithCommand/previous"
|
||||
- "TestE2EWithSignal/current"
|
||||
- "TestE2EWithSignal/previous"
|
||||
- "TestE2EConcurrentWithCommand/current"
|
||||
- "TestE2EConcurrentWithCommand/previous"
|
||||
- "TestE2EConcurrentWithSignal/current"
|
||||
- "TestE2EConcurrentWithSignal/previous"
|
||||
- "TestCordonningIsKept/concurrency1"
|
||||
- "TestCordonningIsKept/concurrency2"
|
||||
- "TestE2EBlocker/podblocker"
|
||||
testname: ${{ fromJSON(needs.e2e-test-matrix.outputs.testnames) }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
|
||||
@@ -109,4 +122,4 @@ jobs:
|
||||
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
||||
|
||||
- name: Run specific e2e tests
|
||||
run: make e2e-test ARGS="-run ^${{ matrix.testname }}"
|
||||
run: make e2e-test ARGS="-run ^${{ matrix.testname }}$"
|
||||
|
||||
Reference in New Issue
Block a user