tests: Fix building incorrect etcd version and make switch strict

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
Marek Siarkowicz
2023-04-03 14:33:27 +02:00
parent 7c7f636aea
commit 9c72ecb1f9
4 changed files with 27 additions and 22 deletions

View File

@@ -6,25 +6,25 @@ on:
schedule:
- cron: '25 9 * * *' # runs every day at 09:25 UTC
jobs:
test-main:
main:
# GHA has a maximum amount of 6h execution time, we try to get done within 3h
uses: ./.github/workflows/robustness-template.yaml
with:
ref: main
etcdBranch: main
count: 100
testTimeout: 200m
artifactName: test-main
test-35:
artifactName: main
release-35:
uses: ./.github/workflows/robustness-template.yaml
with:
ref: release-3.5
etcdBranch: release-3.5
count: 100
testTimeout: 200m
artifactName: test-35
test-34:
artifactName: release-35
release-34:
uses: ./.github/workflows/robustness-template.yaml
with:
ref: release-3.4
etcdBranch: release-3.4
count: 100
testTimeout: 200m
artifactName: test-34
artifactName: release-34

View File

@@ -2,7 +2,7 @@ name: Reusable Robustness Workflow
on:
workflow_call:
inputs:
ref:
etcdBranch:
required: true
type: string
count:
@@ -27,11 +27,12 @@ jobs:
go-version: '1.19.7'
- name: build
env:
GITHUB_REF: ${{ inputs.ref }}
ETCD_BRANCH: "${{ inputs.etcdBranch }}"
run: |
set -euo pipefail
case "${GITHUB_REF}" in
mkdir -p bin
case "${ETCD_BRANCH}" in
release-3.5)
make /tmp/etcd-release-3.5-failpoints/bin/etcd
cp /tmp/etcd-release-3.5-failpoints/bin/etcd bin/etcd
@@ -40,11 +41,15 @@ jobs:
make /tmp/etcd-release-3.4-failpoints/bin/etcd
cp /tmp/etcd-release-3.4-failpoints/bin/etcd bin/etcd
;;
*)
main)
make gofail-enable
make build
;;
esac
*)
echo "Failed to find target ${ETCD_BRANCH}"
exit 1
;;
esac
./bin/etcd --version
- name: test-robustness
run: |

View File

@@ -2,10 +2,10 @@ name: Robustness
on: [push, pull_request]
permissions: read-all
jobs:
test:
main:
uses: ./.github/workflows/robustness-template.yaml
with:
ref: ${{ github.ref }}
etcdBranch: main
count: 15
testTimeout: 30m
artifactName: test
artifactName: main