mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
add linearizability nightlies for release 3.4/3.5
This CL refactors the tests to reuse a single workflow that has parameters. This is then reused for PRs/pushes and the nightlies. Signed-off-by: Thomas Jungblut <tjungblu@redhat.com> Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
7daec2928a
commit
ab3c530b92
41
.github/workflows/linearizability-nightly.yaml
vendored
41
.github/workflows/linearizability-nightly.yaml
vendored
@ -1,25 +1,26 @@
|
||||
name: Linearizability Nightly
|
||||
on:
|
||||
# schedules always run against the main branch
|
||||
# schedules always run against the main branch, hence we have to create separate jobs
|
||||
# with individual checkout actions for each of the active release branches
|
||||
schedule:
|
||||
- cron: '25 9 * * *'
|
||||
- cron: '25 9 * * *' # runs every day at 09:25 UTC
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
test-main:
|
||||
# GHA has a maximum amount of 6h execution time, we try to get done within 3h
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
|
||||
with:
|
||||
go-version: "1.19.5"
|
||||
- run: |
|
||||
make gofail-enable
|
||||
make build
|
||||
mkdir -p /tmp/linearizability
|
||||
cat server/etcdserver/raft.fail.go
|
||||
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count 300 --failfast --run TestLinearizability --timeout=170m' RESULTS_DIR=/tmp/linearizability make test-linearizability
|
||||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
||||
if: always()
|
||||
with:
|
||||
path: /tmp/linearizability/*
|
||||
uses: ./.github/workflows/linearizability-template.yaml
|
||||
with:
|
||||
ref: main
|
||||
count: 300
|
||||
timeoutDuration: 170m
|
||||
test-35:
|
||||
uses: ./.github/workflows/linearizability-template.yaml
|
||||
with:
|
||||
ref: release-3.5
|
||||
count: 300
|
||||
timeoutDuration: 170m
|
||||
test-34:
|
||||
uses: ./.github/workflows/linearizability-template.yaml
|
||||
with:
|
||||
ref: release-3.4
|
||||
count: 300
|
||||
timeoutDuration: 170m
|
||||
|
49
.github/workflows/linearizability-template.yaml
vendored
Normal file
49
.github/workflows/linearizability-template.yaml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
name: Reusable Linearizability Workflow
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
ref:
|
||||
required: true
|
||||
type: string
|
||||
count:
|
||||
required: true
|
||||
type: number
|
||||
testTimeout:
|
||||
required: false
|
||||
type: string
|
||||
default: '30m'
|
||||
permissions: read-all
|
||||
jobs:
|
||||
test:
|
||||
timeout-minutes: 180
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
|
||||
with:
|
||||
go-version: '1.19.5'
|
||||
- name: build
|
||||
env:
|
||||
GITHUB_REF: ${{ inputs.ref }}
|
||||
run: |
|
||||
case "${GITHUB_REF}" in
|
||||
release-3.5)
|
||||
make build-failpoints-release-3.5
|
||||
./bin/etcd --version
|
||||
;;
|
||||
release-3.4)
|
||||
make build-failpoints-release-3.4
|
||||
./bin/etcd --version
|
||||
;;
|
||||
*)
|
||||
make gofail-enable
|
||||
make build
|
||||
;;
|
||||
esac
|
||||
- name: test-linearizability
|
||||
run: |
|
||||
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count ${{ inputs.count }} --timeout ${{ inputs.testTimeout }} --failfast --run TestLinearizability' RESULTS_DIR=/tmp/linearizability make test-linearizability
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
path: /tmp/linearizability/*
|
21
.github/workflows/linearizability.yaml
vendored
21
.github/workflows/linearizability.yaml
vendored
@ -3,19 +3,8 @@ on: [push, pull_request]
|
||||
permissions: read-all
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
|
||||
with:
|
||||
go-version: "1.19.5"
|
||||
- run: |
|
||||
make gofail-enable
|
||||
make build
|
||||
mkdir -p /tmp/linearizability
|
||||
cat server/etcdserver/raft.fail.go
|
||||
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count 60 --failfast --run TestLinearizability' RESULTS_DIR=/tmp/linearizability make test-linearizability
|
||||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
||||
if: always()
|
||||
with:
|
||||
path: /tmp/linearizability/*
|
||||
uses: ./.github/workflows/linearizability-template.yaml
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
count: 60
|
||||
testTimeout: 30m
|
||||
|
23
Makefile
23
Makefile
@ -129,6 +129,29 @@ gofail-disable: install-gofail
|
||||
install-gofail:
|
||||
cd tools/mod; go install go.etcd.io/gofail@${GOFAIL_VERSION}
|
||||
|
||||
build-failpoints-release-3.5:
|
||||
rm -rf /tmp/etcd-release-3.5/
|
||||
mkdir -p /tmp/etcd-release-3.5/
|
||||
cd /tmp/etcd-release-3.5/; \
|
||||
git clone --depth 1 --branch release-3.5 https://github.com/etcd-io/etcd.git .; \
|
||||
go get go.etcd.io/gofail@${GOFAIL_VERSION}; \
|
||||
(cd server; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
|
||||
(cd etcdctl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
|
||||
(cd etcdutl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
|
||||
FAILPOINTS=true ./build;
|
||||
mkdir -p ./bin
|
||||
cp /tmp/etcd-release-3.5/bin/etcd ./bin/etcd
|
||||
|
||||
build-failpoints-release-3.4:
|
||||
rm -rf /tmp/etcd-release-3.4/
|
||||
mkdir -p /tmp/etcd-release-3.4/
|
||||
cd /tmp/etcd-release-3.4/; \
|
||||
git clone --depth 1 --branch release-3.4 https://github.com/etcd-io/etcd.git .; \
|
||||
go get go.etcd.io/gofail@${GOFAIL_VERSION}; \
|
||||
FAILPOINTS=true ./build;
|
||||
mkdir -p ./bin
|
||||
cp /tmp/etcd-release-3.4/bin/etcd ./bin/etcd
|
||||
|
||||
# Cleanup
|
||||
|
||||
clean:
|
||||
|
Loading…
x
Reference in New Issue
Block a user