-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This achieves the following goals: 1. Only run the openssl tests for PRs. 2. Only run the servicemesh tests when its files have been touched. 3. Run all other tests every day at night (and send notifications on failure). 4. Keep the manual dispatch workflow. I don't think it's possible to reasonably achieve all of those with a single workflow file, so I've turned e2e.yaml into a reusable workflow that's invoked by other workflow files with different parameters.
- Loading branch information
Showing
5 changed files
with
217 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,74 @@ | ||
name: e2e test | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
test-name: | ||
description: "Test Name" | ||
required: true | ||
type: choice | ||
options: | ||
- openssl | ||
- servicemesh | ||
- policy | ||
- workloadsecret | ||
- volumestatefulset | ||
default: "openssl" | ||
platform: | ||
description: "Platform" | ||
required: true | ||
type: choice | ||
options: | ||
- AKS-CLH-SNP | ||
- K3s-QEMU-SNP | ||
- K3s-QEMU-TDX | ||
skip-undeploy: | ||
description: "Skip undeploy" | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
determine-platform-params: | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
runner: ${{ steps.determine-platform-params.outputs.runner }} | ||
self-hosted: ${{ steps.determine-platform-params.outputs.self-hosted }} | ||
steps: | ||
- name: Determine Platform Parameters | ||
id: determine-platform-params | ||
run: | | ||
case ${{ inputs.platform }} in | ||
"AKS-CLH-SNP") | ||
echo "runner=ubuntu-22.04" >> "$GITHUB_OUTPUT" | ||
echo "self-hosted=false" >> "$GITHUB_OUTPUT" | ||
;; | ||
"K3s-QEMU-SNP") | ||
echo "runner=SNP" >> "$GITHUB_OUTPUT" | ||
echo "self-hosted=true" >> "$GITHUB_OUTPUT" | ||
;; | ||
"K3s-QEMU-TDX") | ||
echo "runner=TDX" >> "$GITHUB_OUTPUT" | ||
echo "self-hosted=true" >> "$GITHUB_OUTPUT" | ||
;; | ||
*) | ||
echo "Unsupported platform: {{ platform }}" | ||
exit 1 | ||
;; | ||
esac | ||
test: | ||
name: "${{ inputs.platform }}" | ||
needs: [determine-platform-params] | ||
uses: ./.github/workflows/e2e.yaml | ||
with: | ||
skip-undeploy: ${{ inputs.skip-undeploy }} | ||
test-name: ${{ inputs.test-name }} | ||
platform: ${{ inputs.platform }} | ||
runner: ${{ needs.determine-platform-params.outputs.runner }} | ||
self-hosted: ${{ fromJSON(needs.determine-platform-params.outputs.self-hosted) }} | ||
send-failure-notifications: false | ||
secrets: inherit | ||
permissions: | ||
contents: read | ||
packages: write |
This file contains 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,35 @@ | ||
name: e2e test | ||
|
||
on: | ||
schedule: | ||
- cron: "30 4 * * *" # 4:30 a.m. every day | ||
|
||
jobs: | ||
test_matrix: | ||
strategy: | ||
matrix: | ||
platform: | ||
- name: AKS-CLH-SNP | ||
runner: ubuntu-22.04 | ||
self-hosted: false | ||
- name: K3s-QEMU-SNP | ||
runner: SNP | ||
self-hosted: true | ||
- name: K3s-QEMU-TDX | ||
runner: TDX | ||
self-hosted: true | ||
test-name: [servicemesh, openssl, policy, workloadsecret, volumestatefulset] | ||
fail-fast: false | ||
name: "${{ matrix.platform.name }}" | ||
uses: ./.github/workflows/e2e.yaml | ||
with: | ||
skip-undeploy: false | ||
test-name: ${{ matrix.test-name }} | ||
platform: ${{ matrix.platform.name }} | ||
runner: ${{ matrix.platform.runner }} | ||
self-hosted: ${{ matrix.platform.self-hosted }} | ||
send-failure-notifications: true | ||
secrets: inherit | ||
permissions: | ||
contents: read | ||
packages: write |
This file contains 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,39 @@ | ||
name: e2e test | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- dev-docs/** | ||
- docs/** | ||
- rfc/** | ||
- tools/asciinema/** | ||
- tools/vale/** | ||
|
||
jobs: | ||
test_matrix: | ||
strategy: | ||
matrix: | ||
platform: | ||
- name: AKS-CLH-SNP | ||
runner: ubuntu-22.04 | ||
self-hosted: false | ||
- name: K3s-QEMU-SNP | ||
runner: SNP | ||
self-hosted: true | ||
- name: K3s-QEMU-TDX | ||
runner: TDX | ||
self-hosted: true | ||
fail-fast: false | ||
name: "${{ matrix.platform.name }}" | ||
uses: ./.github/workflows/e2e.yaml | ||
with: | ||
skip-undeploy: false | ||
test-name: openssl | ||
platform: ${{ matrix.platform.name }} | ||
runner: ${{ matrix.platform.runner }} | ||
self-hosted: ${{ matrix.platform.self-hosted }} | ||
send-failure-notifications: false | ||
secrets: inherit | ||
permissions: | ||
contents: read | ||
packages: write |
This file contains 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,36 @@ | ||
name: e2e test | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- e2e/servicemesh/** | ||
- service-mesh/** | ||
|
||
jobs: | ||
test_matrix: | ||
strategy: | ||
matrix: | ||
platform: | ||
- name: AKS-CLH-SNP | ||
runner: ubuntu-22.04 | ||
self-hosted: false | ||
- name: K3s-QEMU-SNP | ||
runner: SNP | ||
self-hosted: true | ||
- name: K3s-QEMU-TDX | ||
runner: TDX | ||
self-hosted: true | ||
fail-fast: false | ||
name: "${{ matrix.platform.name }}" | ||
uses: ./.github/workflows/e2e.yaml | ||
with: | ||
skip-undeploy: false | ||
test-name: servicemesh | ||
platform: ${{ matrix.platform.name }} | ||
runner: ${{ matrix.platform.runner }} | ||
self-hosted: ${{ matrix.platform.self-hosted }} | ||
send-failure-notifications: false | ||
secrets: inherit | ||
permissions: | ||
contents: read | ||
packages: write |