forked from antrea-io/antrea
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a parameterized workflow to run conformance tests flexibly
Signed-off-by: Quan Tian <[email protected]>
- Loading branch information
Showing
8 changed files
with
99 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Go Benchmark Test | |
on: | ||
push: | ||
branches: | ||
- main | ||
- main123 | ||
|
||
jobs: | ||
go-benchmark-checks: | ||
|
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
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,79 @@ | ||
name: Manually run upstream conformance test | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
antrea-version: | ||
description: The Antrea version to test. It could be a SHA-1 value, a branch, or a tag (e.g. a7b012b, release-1.12, v1.12.0). It defaults to the main branch. | ||
default: main | ||
required: true | ||
k8s-version: | ||
description: K8s version (e.g. v1.27.1). Kind's default K8s version will be used if empty. | ||
required: false | ||
test-suite: | ||
description: The test suite to run. Valid values include "whole-conformance", "conformance", "network-policy, "sig-network", and "all". | ||
default: whole-conformance | ||
required: true | ||
always-upload-logs: | ||
description: Always upload logs regardless of the test result. | ||
type: boolean | ||
default: false | ||
|
||
env: | ||
KIND_VERSION: v0.18.0 | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- name: Free disk space | ||
# https://github.com/actions/virtual-environments/issues/709 | ||
run: | | ||
sudo apt-get clean | ||
df -h | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.antrea-version }} | ||
fetch-depth: 0 | ||
- name: Check if it is a released version | ||
id: check-release | ||
run: | | ||
if git show-ref --tags --verify --quiet refs/tags/${{ inputs.antrea-version }}; then | ||
echo "released=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "released=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Build Antrea image if required | ||
if: ${{ steps.check-release.outputs.released == 'false' }} | ||
run: | | ||
./hack/build-antrea-linux-all.sh --pull | ||
- name: Install Kind | ||
run: | | ||
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64 | ||
chmod +x ./kind | ||
sudo mv kind /usr/local/bin | ||
- name: Create K8s cluster | ||
run: | | ||
./ci/kind/kind-setup.sh create kind \ | ||
--k8s-version "${{ inputs.k8s-version }}" | ||
- name: Install Antrea | ||
run: | | ||
if [ ${{ steps.check-release.outputs.released }} == 'true' ]; then | ||
helm repo add antrea https://charts.antrea.io | ||
helm repo update | ||
helm install --namespace kube-system antrea antrea/antrea --version "${{ inputs.antrea-version }}" | ||
else | ||
kubectl apply -f build/yamls/antrea.yml | ||
fi | ||
kubectl rollout status -n kube-system ds/antrea-agent --timeout=5m | ||
- name: Run e2e tests | ||
run: | | ||
./ci/run-k8s-e2e-tests.sh "--e2e-${{ inputs.test-suite }}" | ||
- name: Upload test log | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ failure() || inputs.always-upload-logs }} | ||
with: | ||
name: sonobuoy.tar.gz | ||
path: "*_sonobuoy_*.tar.gz" | ||
retention-days: 7 |
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
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