Repository navigation
61 lines (57 loc) · 2.26 KB
/
Copy pathcompatibility.yml
File metadata and controls
61 lines (57 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Compatibility
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: compatibility-${{ github.event_name == 'push' && github.run_id || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
protobuf:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# actions/checkout v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
with:
fetch-depth: 0
persist-credentials: false
- name: Install checksum-pinned Buf
run: |
bash deploy/automation/install-buf.sh "$RUNNER_TEMP/buf-bin"
echo "$RUNNER_TEMP/buf-bin" >> "$GITHUB_PATH"
- name: Compare Protobuf contracts
env:
BASELINE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
run: python3 deploy/automation/protobuf_compatibility.py "$BASELINE_SHA" HEAD
persistence:
runs-on: ubuntu-latest
timeout-minutes: 25
env:
GOPROXY: https://golang.flatt.tech
steps:
# actions/checkout v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
with:
fetch-depth: 0
persist-credentials: false
# actions/setup-go v6
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c
with:
go-version-file: go.mod
- name: Build baseline and candidate
env:
BASELINE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
run: |
baseline=$(git rev-parse --verify --end-of-options "${BASELINE_SHA}^{commit}")
mkdir "$RUNNER_TEMP/baseline-source"
git archive "$baseline" | tar -x -C "$RUNNER_TEMP/baseline-source"
(cd "$RUNNER_TEMP/baseline-source" && go build -o "$RUNNER_TEMP/elastickv-baseline" .)
go build -o "$RUNNER_TEMP/elastickv-candidate" .
go build -o "$RUNNER_TEMP/raftadmin" ./cmd/raftadmin
- name: Install Redis test client
run: sudo apt-get install -y redis-tools
- name: Check quorum and data through rolling upgrade, downgrade, reupgrade and snapshot restart
run: bash scripts/compatibility-smoke.sh "$RUNNER_TEMP/elastickv-baseline" "$RUNNER_TEMP/elastickv-candidate" "$RUNNER_TEMP/raftadmin"