@@ -165,6 +165,71 @@ jobs:
165165 rm -rf src/bkr/inttest/server/selenium
166166 ./run-tests.sh -v ${{ matrix.test-target }}
167167
168+ integration-tests-py3 :
169+ runs-on : ubuntu-latest
170+ env :
171+ MYSQL_USER : beaker
172+ MYSQL_PASSWORD : beaker
173+ MYSQL_ROOT_PASSWORD : toor
174+ strategy :
175+ fail-fast : false
176+ matrix :
177+ test-target : ["bkr.inttest.server.test_powertypes"]
178+ container :
179+ image : quay.io/centos/centos:stream9
180+ options : --init
181+ services :
182+ database :
183+ image : mariadb:10-ubi
184+ env :
185+ MYSQL_USER : ${{ env.MYSQL_USER }}
186+ MYSQL_PASSWORD : ${{ env.MYSQL_PASSWORD }}
187+ MYSQL_ROOT_PASSWORD : ${{ env.MYSQL_ROOT_PASSWORD }}
188+ ports :
189+ - 3306
190+ steps :
191+ - name : Enable CRB + EPEL
192+ run : |
193+ dnf install -y 'dnf-command(config-manager)'
194+ dnf config-manager --set-enabled crb
195+ dnf install -y epel-release
196+ - name : Checkout
197+ uses : actions/checkout@v4
198+ - name : Install Python 3 server + test dependencies
199+ run : |
200+ dnf install -y \
201+ python3 python3-pip python3-setuptools \
202+ python3-sqlalchemy python3-alembic python3-daemon python3-flask \
203+ python3-lxml python3-six python3-markdown python3-configobj \
204+ python3-ldap python3-netaddr python3-passlib python3-pwquality \
205+ python3-rpm python3-decorator python3-itsdangerous python3-werkzeug \
206+ python3-requests python3-gssapi python3-simplejson python3-mysqlclient \
207+ python3-pytest python3-gunicorn python3-formencode \
208+ mariadb openldap-servers openldap-clients lsof
209+ - name : Configure database for testing
210+ run : |
211+ cat <<EOT > init.sql
212+ CREATE DATABASE beaker_test;
213+ CREATE DATABASE beaker_migration_test;
214+ GRANT ALL PRIVILEGES ON beaker_test.* TO 'beaker'@'%';
215+ GRANT ALL PRIVILEGES ON beaker_migration_test.* TO 'beaker'@'%';
216+ SET GLOBAL max_allowed_packet=1073741824;
217+ SET GLOBAL character_set_server=utf8;
218+ EOT
219+
220+ mysql -uroot -p${{ env.MYSQL_ROOT_PASSWORD }} -h database < init.sql
221+ sed -i 's/@localhost/@database/g' IntegrationTests/server-test.cfg
222+ - name : Update version
223+ run : |
224+ current_version=$(grep -oE "__version__ = '[^']+'" Common/bkr/common/__init__.py | cut -d "'" -f 2)
225+ new_version="$current_version.git.${GITHUB_SHA::7}"
226+ sed -i "s/__version__ = '$current_version'/__version__ = '$new_version'/" Common/bkr/common/__init__.py
227+ - name : Run integration tests for ${{ matrix.test-target }} (Python 3)
228+ run : |
229+ pushd IntegrationTests
230+ rm -rf src/bkr/inttest/server/selenium
231+ BKR_PY3=1 ./run-tests.sh -v ${{ matrix.test-target }}
232+
168233 unit-tests :
169234 runs-on : ubuntu-latest
170235 container :
0 commit comments