-
Notifications
You must be signed in to change notification settings - Fork 2.3k
107 lines (93 loc) · 3.03 KB
/
local_example.yml
File metadata and controls
107 lines (93 loc) · 3.03 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: local_example
on:
push:
branches:
- "main"
- "release-[0-9]+.[0-9]"
tags: '**'
pull_request:
branches: '**'
permissions: read-all
env:
BOOTSTRAP_VERSION: "ci"
BOOTSTRAP_FLAVOR: "mysql84"
jobs:
build:
name: Local example using ${{ matrix.topo }} on Ubuntu
runs-on: ${{ github.repository == 'vitessio/vitess' && 'oracle-vm-16cpu-64gb-x86-64' || 'ubuntu-24.04' }}
strategy:
matrix:
topo: [etcd, zk2]
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Skip CI
run: |
if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then
echo "skipping CI due to the 'Skip CI' label"
exit 1
fi
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: 'false'
- name: Check for changes in relevant files
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: changes
with:
token: ''
filters: |
examples:
- 'test/config.json'
- 'go/**/*.go'
- 'test.go'
- 'Makefile'
- 'build.env'
- 'go.sum'
- 'go.mod'
- 'proto/*.proto'
- 'tools/**'
- 'config/**'
- 'bootstrap.sh'
- 'examples/**'
- '.github/workflows/local_example.yml'
- name: Build bootstrap images
if: steps.changes.outputs.examples == 'true'
timeout-minutes: 15
uses: ./.github/actions/build-bootstrap
- name: Set up Go
if: steps.changes.outputs.examples == 'true'
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: ${{ (github.base_ref == 'main' || (github.base_ref == '' && github.ref_name == 'main')) && 'true' || 'false' }}
- name: Tune the OS
if: steps.changes.outputs.examples == 'true'
timeout-minutes: 5
uses: ./.github/actions/tune-os
- name: Get dependencies
if: steps.changes.outputs.examples == 'true'
timeout-minutes: 5
run: |
go mod download
- name: Run make minimaltools
if: steps.changes.outputs.examples == 'true'
timeout-minutes: 5
run: |
make minimaltools
- name: Build
if: steps.changes.outputs.examples == 'true'
timeout-minutes: 10
run: |
make build
- name: local_example
if: steps.changes.outputs.examples == 'true'
timeout-minutes: 30
run: |
export TOPO=${{matrix.topo}}
if [ "${{matrix.os}}" = "macos-latest" ]; then
export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"
fi
go run test.go -print-log -follow -pull=false -flavor=${{ env.BOOTSTRAP_FLAVOR }} -bootstrap-version=${{ env.BOOTSTRAP_VERSION }} local_example