forked from opencast/opencast
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.01 KB
/
test-database-upgrade.yml
File metadata and controls
40 lines (36 loc) · 1.01 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
name: Test database upgrade
on:
pull_request:
paths:
- 'docs/upgrade/*/mysql5.sql'
push:
paths:
- 'docs/upgrade/*/mysql5.sql'
jobs:
# Test database upgrade path.
# For this, we initialize a 2.2 database and upgrade all the way to the latest version
database:
strategy:
matrix:
db:
- 'mysql:8'
- 'mariadb:10'
runs-on: ubuntu-20.04
container: ubuntu
services:
mydb:
image: ${{ matrix.db }}
env:
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- uses: actions/checkout@v2
- name: initialize database
run: |
apt update -q
apt install -q -y mysql-client curl bc
mysql --host mydb -uroot -ppassword -e 'select version()'
- name: check upgrade path
run: |
sed -i 's_remote=""_remote="--host mydb -ppassword"_' docs/upgrade/.test.sh
./docs/upgrade/.test.sh