Update CI to check old db upgrade #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Database Upgrade Test | |
on: | |
push: | |
branches: | |
- main | |
- '[0-9]+.[0-9]+' | |
pull_request: | |
branches: | |
- main | |
- '[0-9]+.[0-9]+' | |
jobs: | |
upgrade_test: | |
runs-on: ubuntu-latest | |
container: | |
image: domjudge/gitlabci:24.04 | |
services: | |
sqlserver: | |
image: mariadb | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_USER: domjudge | |
MYSQL_PASSWORD: domjudge | |
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Import Database | |
run: mysql -hsqlserver -uroot -proot < .github/jobs/data/dj733.sql | |
- name: Install DOMjudge | |
run: .github/jobs/baseinstall.sh default upgrade | |
- name: Setting init Admin Passwod | |
run: echo "pass" > /opt/domjudge/domserver/etc/initial_admin_password.secret | |
- name: Check for Errors in the Upgrade | |
run: mysql -hsqlserver -u"root" -p"root" -e "SHOW TABLES FROM domjudge;" | |
- name: Check for Errors in Domjudge Web | |
run: .github/jobs/webstandard.sh none admin |