Skip to content
Closed
Changes from 5 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
23 changes: 17 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,27 @@ jobs:
integration:
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
matrix:
SQL_ISOLATION: ['REPEATABLE-READ', 'SERIALIZABLE']
include:
- sql: mariadb
sql_options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
- sql: mysql
sql_options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why the health intervals differ?

container:
image: domjudge/gitlabci:24.04
options: --privileged --cgroupns=host --init
services:
sqlserver:
image: mariadb
image: ${{ matrix.sql }}
options: ${{ matrix.sql_options }}
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 +47,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 +86,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