Skip to content

Commit

Permalink
Reorder and hopefully fix the first unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Dec 3, 2024
1 parent 28ca9fc commit 1608dcc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/jobs/baseinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ elif [ "$version" = "balloon" ]; then
elif [ "$version" = "admin" ]; then
# Add admin to admin user
mysql_root "INSERT INTO userrole (userid, roleid) VALUES (1, 1);" $DATABASE_NAME
elif [ "$version" = "all" ]; then
elif [ "$version" = "all" ] || [ "$version" = "unit" ]; then
mysql_root "INSERT INTO userrole (userid, roleid) VALUES (1, 1);" $DATABASE_NAME
mysql_root "INSERT INTO userrole (userid, roleid) VALUES (1, 3);" $DATABASE_NAME
mysql_root "UPDATE user SET teamid = 1 WHERE userid = 1;" $DATABASE_NAME
Expand Down
33 changes: 17 additions & 16 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,21 @@ jobs:
MYSQL_USER: domjudge
MYSQL_PASSWORD: domjudge
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
PHPVERSION: [8.1]
TEST: [Unit, E2E]
CRAWL_SHADOW_MODE: [0]
SQL_OPTIONS: [--health-cmd="healthcheck.sh --connect --innodb_initialized"]
SQL: [mariadb]
#include:
# - PHPVERSION: 8.4
# TEST: Unit
# SQL: mysql
# SQL_OPTIONS: --health-cmd="mysqladmin ping"
steps:
- uses: actions/checkout@v4
- name: Download latest codecov upload script
run: wget https://codecov.io/bash -O newcodecov
- name: Detect changes to manually verify
run: diff newcodecov .github/jobs/uploadcodecov.sh
- name: info
run: |
cat /proc/cmdline && echo &&
cat /proc/mounts && echo &&
ls -al /sys/fs/cgroup && echo &&
uname -a && echo &&
stat -fc %T /sys/fs/cgroup && echo &&
cat /proc/self/cgroup && echo &&
cat /proc/cpuinfo
- name: pstree
run: pstree -p
- name: Install DOMjudge
run: .github/jobs/baseinstall.sh unit install test
- name: Run the unit tests
run: .github/jobs/unit-tests.sh ${{ matrix.PHPVERSION }} ${{ matrix.TEST }}
- name: Upload artifact for debugging
Expand All @@ -56,6 +53,10 @@ jobs:
with:
files: |
unit-tests.xml
- name: Download latest codecov upload script
run: wget https://codecov.io/bash -O newcodecov
- name: Detect changes to manually verify
run: diff newcodecov .github/jobs/uploadcodecov.sh

check-static-codecov:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 1608dcc

Please sign in to comment.