Run arm64 robustness tests in a container.

Signed-off-by: James Blair <mail@jamesblair.net>
dependabot/go_modules/github.com/prometheus/procfs-0.11.0
James Blair 2023-05-23 20:18:40 +12:00
parent 4153ecb93b
commit a0063d76e7
No known key found for this signature in database
2 changed files with 73 additions and 1 deletions

View File

@ -15,7 +15,7 @@ jobs:
testTimeout: 200m
artifactName: main
main-arm64:
uses: ./.github/workflows/robustness-template.yaml
uses: ./.github/workflows/robustness-template-arm64.yaml
with:
etcdBranch: main
count: 100

View File

@ -0,0 +1,72 @@
name: Reusable Robustness Workflow
on:
workflow_call:
inputs:
etcdBranch:
required: true
type: string
count:
required: true
type: number
testTimeout:
required: false
type: string
default: '30m'
artifactName:
required: true
type: string
runs-on:
required: false
type: string
default: "['ubuntu-latest']"
permissions: read-all
jobs:
goversion:
uses: ./.github/workflows/go-version.yaml
test:
timeout-minutes: 210
runs-on: ${{ fromJson(inputs.runs-on) }}
needs: goversion
container: golang:1.19-bullseye
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# https://github.com/actions/checkout/issues/1169
- run: git config --system --add safe.directory '*'
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: ${{ needs.goversion.outputs.goversion }}
- name: test-robustness
env:
ETCD_BRANCH: "${{ inputs.etcdBranch }}"
run: |
set -euo pipefail
# Use --failfast to avoid overriding report generated by failed test
GO_TEST_FLAGS="-v --count ${{ inputs.count }} --timeout ${{ inputs.testTimeout }} --failfast --run TestRobustness"
case "${ETCD_BRANCH}" in
release-3.5)
EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness-release-3.5
;;
release-3.4)
EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness-release-3.4
;;
main)
make gofail-enable
make build
EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness
;;
*)
echo "Failed to find target ${ETCD_BRANCH}"
exit 1
;;
esac
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
if: always()
with:
name: ${{ inputs.artifactName }}
path: /tmp/results/*