diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 56ee842a2c..70d1535980 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,5 +1,6 @@ name: Run integration tests on: + push: merge_group: pull_request: branches: @@ -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 @@ -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 @@ -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