Skip to content

Also test with the strict SQL version #2818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Run integration tests
on:
push:
merge_group:
pull_request:
branches:
Expand All @@ -10,19 +11,29 @@ jobs:
integration:
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
matrix:
SQL_ISOLATION: ['REPEATABLE-READ', 'SERIALIZABLE']
SQL: [mariadb, mysql]
include:
- SQL: mysql
SQL_options: --health-cmd="mysqladmin ping"
- SQL: mariadb
SQL_options: --health-cmd="healthcheck.sh --connect --innodb_initialized"
SQL_ISOLATION: 'REPEATABLE-READ'
container:
image: domjudge/gitlabci:24.04
options: --privileged --cgroupns=host --init
services:
sqlserver:
image: mariadb
image: ${{ matrix.SQL }}
options: ${{ matrix.SQL_options }} --health-interval=10s --health-timeout=5s --health-retries=3
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: info
Expand All @@ -38,6 +49,8 @@ jobs:
run: pstree -p
- name: Install DOMjudge
run: .github/jobs/baseinstall.sh all
- name: Set SQL isolation
run: echo "SET GLOBAL transaction_isolation=${{ matrix.SQL_ISOLATION }};" mysql -uroot -proot -hsqlserver
- name: Set up chroot
run: sudo misc-tools/dj_make_chroot -a amd64
- name: Check nginx
Expand Down Expand Up @@ -75,18 +88,18 @@ jobs:
done
- name: dump the db
if: ${{ !cancelled() }}
run: mysqldump -uroot -proot domjudge > /tmp/db.sql
run: mysqldump -uroot -proot --quick --max_allowed_packet=512M domjudge > /tmp/db.sql
- name: Upload database dump for debugging
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: DB-dump
name: DB-dump-${{ matrix.SQL_ISOLATION }}-${{ matrix.SQL }}
path: /tmp/db.sql
- name: Upload all logs/artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: Logs
name: Logs-${{ matrix.SQL_ISOLATION }}-${{ matrix.SQL }}
path: |
/var/log/nginx
/opt/domjudge/domserver/webapp/var/log/*.log
Expand Down
Loading