Skip to content

Commit 3878a37

Browse files
authored
ci: make compatibility environments reproducible (#472)
1 parent b2067bc commit 3878a37

2 files changed

Lines changed: 24 additions & 17 deletions

File tree

.github/workflows/clients-compatibility.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
test-mysql:
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-24.04
1616
steps:
1717
- uses: actions/checkout@v4
1818

@@ -32,10 +32,12 @@ jobs:
3232
python-version: '3.13'
3333

3434
- name: Install system packages
35-
uses: awalsh128/cache-apt-pkgs-action@latest
36-
with:
37-
packages: bats cpanminus libmysqlclient-dev dotnet-sdk-8.0 dotnet-runtime-8.0 php-mysql r-base-core
38-
version: 1.1
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y --no-install-recommends \
38+
bats cpanminus libmysqlclient-dev dotnet-sdk-8.0 \
39+
dotnet-runtime-8.0 php-mysql r-base-core
40+
cpanm --version
3941
4042
- name: Install dependencies
4143
run: |
@@ -72,7 +74,7 @@ jobs:
7274
bats ./compatibility/mysql/test.bats
7375
7476
test-postgresql:
75-
runs-on: ubuntu-latest
77+
runs-on: ubuntu-24.04
7678
steps:
7779
- uses: actions/checkout@v4
7880

@@ -92,10 +94,12 @@ jobs:
9294
python-version: '3.13'
9395

9496
- name: Install system packages
95-
uses: awalsh128/cache-apt-pkgs-action@latest
96-
with:
97-
packages: bats cpanminus libpq-dev postgresql-client dotnet-sdk-8.0 dotnet-runtime-8.0 r-base-core
98-
version: 1.1
97+
run: |
98+
sudo apt-get update
99+
sudo apt-get install -y --no-install-recommends \
100+
bats cpanminus libpq-dev postgresql-client dotnet-sdk-8.0 \
101+
dotnet-runtime-8.0 r-base-core
102+
cpanm --version
99103
100104
- name: Install dependencies
101105
run: |
@@ -169,4 +173,4 @@ jobs:
169173
- name: Run the Compatibility Test for FlightSQL
170174
run: |
171175
go test -v ./compatibility/flightsql/go/flightsql_test.go
172-
python3 -m unittest discover ./compatibility/flightsql/python -p "flightsql_test.py"
176+
python3 -m unittest discover ./compatibility/flightsql/python -p "flightsql_test.py"

.github/workflows/mysql-copy-tests.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ on:
88

99
jobs:
1010
copy-instance-test:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
services:
1313
source:
14-
image: mysql:lts
14+
# MySQL 8.4.7, linux/amd64
15+
image: mysql@sha256:6c6706ec58d3ac9e925d5f0435c6a923117f68232551b9c8271a294ea72ee331
1516
env:
1617
MYSQL_ROOT_PASSWORD: root
1718
ports:
@@ -41,8 +42,12 @@ jobs:
4142
4243
pip3 install "sqlglot[rs]"
4344
44-
curl -LJO https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell_9.1.0-1debian12_amd64.deb
45-
sudo apt-get install -y ./mysql-shell_9.1.0-1debian12_amd64.deb
45+
mysql_shell_deb=mysql-shell_9.1.0-1debian12_amd64.deb
46+
curl --fail --location --show-error --output "$mysql_shell_deb" \
47+
"https://dev.mysql.com/get/Downloads/MySQL-Shell/$mysql_shell_deb"
48+
echo "feffebc3e0f0dae3e2b7fc3d2783f557860f60aef557c7f972f95f61fba9c630 $mysql_shell_deb" | sha256sum --check -
49+
sudo apt-get install -y "./$mysql_shell_deb"
50+
mysqlsh --version
4651
4752
- name: Setup test data in source MySQL
4853
run: |
@@ -115,5 +120,3 @@ jobs:
115120
116121
diff source_data_$table.tsv copied_data_$table.tsv
117122
done
118-
119-

0 commit comments

Comments
 (0)