-
Notifications
You must be signed in to change notification settings - Fork 491
109 lines (100 loc) · 4.17 KB
/
regression-test.yml
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
108
109
name: polardb-regression-testing
on:
push:
branches: [ POLARDB_11_DEV, POLARDB_11_STABLE ]
paths:
- '.github/workflows/regression-test.yml'
- 'config/**'
- 'contrib/**'
- 'external/**'
- 'src/**'
- 'configure*'
- 'polardb_build.sh'
pull_request:
branches: [ POLARDB_11_DEV, POLARDB_11_STABLE ]
paths:
- '.github/workflows/regression-test.yml'
- 'config/**'
- 'contrib/**'
- 'external/**'
- 'src/**'
- 'configure*'
- 'polardb_build.sh'
# trigger testing manually
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
container_image: [ centos7 ]
instance_type: [ oltp, htap, dma ]
steps:
-
name: Fetch PolarDB source code
uses: actions/checkout@v3
-
name: Create and start the container
run: |
docker create \
-t \
--name polardb_${{ matrix.container_image }} \
-v `pwd`:/home/postgres/PolarDB-for-PostgreSQL \
mrdrivingduck/polardb_pg_devel:${{ matrix.container_image }} \
bash && \
docker start polardb_${{ matrix.container_image }}
-
name: Change ownership of the source code
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
sudo chown -R postgres:postgres ./"
-
name: Ignore some test cases for OLTP regression testing
if: ${{ matrix.instance_type == 'oltp' }}
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL"
-
name: Build and run OLTP regression testing
if: ${{ matrix.instance_type == 'oltp' }}
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
source /etc/bashrc && \
./polardb_build.sh --withrep -r -e -r-external \
-r-contrib -r-pl --with-tde"
-
name: Ignore some test cases for HTAP regression testing
if: ${{ matrix.instance_type == 'htap' }}
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
sed -i 's/test: polar-px-dev\/polar_partition_huge/#&/g' src/test/regress/polar-px-dev-schedule"
-
name: Build and run HTAP regression testing
if: ${{ matrix.instance_type == 'htap' }}
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
source /etc/bashrc && \
./polardb_build.sh -r-px -e -r-external \
-r-contrib -r-pl --with-tde"
-
name: Build and run DMA regression testing
if: ${{ matrix.instance_type == 'dma' }}
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
source /etc/bashrc && \
./polardb_build.sh -r -e -r-external \
-r-contrib -r-pl --with-tde --with-dma"
- name: Change ownership of the source code
run: |
sudo chown -R runner:runner `pwd`