forked from percona/orchestrator
-
Notifications
You must be signed in to change notification settings - Fork 9
77 lines (59 loc) · 2.04 KB
/
Copy pathupgrade.yml
File metadata and controls
77 lines (59 loc) · 2.04 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
name: upgrade
on: [pull_request]
jobs:
upgrade:
runs-on: ubuntu-latest
# strategy:
# matrix:
# backend: [sqlite, MySQL]
steps:
- name: check out
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25.7'
cache: true
- name: Start local MySQL
run: sudo /etc/init.d/mysql start
- name: copy config file template
run: |
cp conf/orchestrator-ci-upgrade.conf.json /tmp
- name: generate SQLite config file
run: |
test_config_file=/tmp/orchestrator-ci-sqlite.conf.json
cp /tmp/orchestrator-ci-upgrade.conf.json ${test_config_file}
sed -i -e "s/backend-db-placeholder/sqlite/g" ${test_config_file}
echo "SQLite config generated"
- name: generate MySQL config file
run: |
test_config_file=/tmp/orchestrator-ci-mysql.conf.json
cp /tmp/orchestrator-ci-upgrade.conf.json ${test_config_file}
sed -i -e "s/backend-db-placeholder/mysql/g" ${test_config_file}
echo "MySQL config generated"
- name: check out master branch
uses: actions/checkout@v4
with:
ref: master
- name: build master
run: script/test-build
- name: execute master via SQLite
run: |
test_config_file=/tmp/orchestrator-ci-sqlite.conf.json
bin/orchestrator --config=$test_config_file -c clusters
- name: execute master via MySQL
run: |
test_config_file=/tmp/orchestrator-ci-mysql.conf.json
bin/orchestrator --config=$test_config_file -c clusters
- name: check out PR branch
uses: actions/checkout@v4
- name: build branch
run: script/test-build
- name: execute branch via SQLite
run: |
test_config_file=/tmp/orchestrator-ci-sqlite.conf.json
bin/orchestrator --config=$test_config_file -c clusters
- name: execute branch via MySQL
run: |
test_config_file=/tmp/orchestrator-ci-mysql.conf.json
bin/orchestrator --config=$test_config_file -c clusters