Skip to content

Commit 1608dcc

Browse files
committed
Reorder and hopefully fix the first unit tests
1 parent 28ca9fc commit 1608dcc

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

.github/jobs/baseinstall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ elif [ "$version" = "balloon" ]; then
143143
elif [ "$version" = "admin" ]; then
144144
# Add admin to admin user
145145
mysql_root "INSERT INTO userrole (userid, roleid) VALUES (1, 1);" $DATABASE_NAME
146-
elif [ "$version" = "all" ]; then
146+
elif [ "$version" = "all" ] || [ "$version" = "unit" ]; then
147147
mysql_root "INSERT INTO userrole (userid, roleid) VALUES (1, 1);" $DATABASE_NAME
148148
mysql_root "INSERT INTO userrole (userid, roleid) VALUES (1, 3);" $DATABASE_NAME
149149
mysql_root "UPDATE user SET teamid = 1 WHERE userid = 1;" $DATABASE_NAME

.github/workflows/unit-tests.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,21 @@ jobs:
2424
MYSQL_USER: domjudge
2525
MYSQL_PASSWORD: domjudge
2626
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
27-
strategy:
28-
matrix:
29-
PHPVERSION: [8.1]
30-
TEST: [Unit, E2E]
31-
CRAWL_SHADOW_MODE: [0]
32-
SQL_OPTIONS: [--health-cmd="healthcheck.sh --connect --innodb_initialized"]
33-
SQL: [mariadb]
34-
#include:
35-
# - PHPVERSION: 8.4
36-
# TEST: Unit
37-
# SQL: mysql
38-
# SQL_OPTIONS: --health-cmd="mysqladmin ping"
3927
steps:
4028
- uses: actions/checkout@v4
41-
- name: Download latest codecov upload script
42-
run: wget https://codecov.io/bash -O newcodecov
43-
- name: Detect changes to manually verify
44-
run: diff newcodecov .github/jobs/uploadcodecov.sh
29+
- name: info
30+
run: |
31+
cat /proc/cmdline && echo &&
32+
cat /proc/mounts && echo &&
33+
ls -al /sys/fs/cgroup && echo &&
34+
uname -a && echo &&
35+
stat -fc %T /sys/fs/cgroup && echo &&
36+
cat /proc/self/cgroup && echo &&
37+
cat /proc/cpuinfo
38+
- name: pstree
39+
run: pstree -p
40+
- name: Install DOMjudge
41+
run: .github/jobs/baseinstall.sh unit install test
4542
- name: Run the unit tests
4643
run: .github/jobs/unit-tests.sh ${{ matrix.PHPVERSION }} ${{ matrix.TEST }}
4744
- name: Upload artifact for debugging
@@ -56,6 +53,10 @@ jobs:
5653
with:
5754
files: |
5855
unit-tests.xml
56+
- name: Download latest codecov upload script
57+
run: wget https://codecov.io/bash -O newcodecov
58+
- name: Detect changes to manually verify
59+
run: diff newcodecov .github/jobs/uploadcodecov.sh
5960

6061
check-static-codecov:
6162
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)