Skip to content

Commit d2411c7

Browse files
committed
Start with the integration test as template
The next commits will remove the unneeded parts and will be squashed together before merging.
1 parent 6acdf80 commit d2411c7

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/unit-tests.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,58 @@ jobs:
1717
- name: Detect changes to manually verify
1818
run: diff newcodecov .github/jobs/uploadcodecov.sh
1919

20+
integration:
21+
runs-on: ubuntu-24.04
22+
timeout-minutes: 20
23+
container:
24+
image: domjudge/gitlabci:24.04
25+
services:
26+
sqlserver:
27+
image: mariadb
28+
ports:
29+
- 3306:3306
30+
env:
31+
MYSQL_ROOT_PASSWORD: root
32+
MYSQL_USER: domjudge
33+
MYSQL_PASSWORD: domjudge
34+
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: info
38+
run: |
39+
cat /proc/cmdline && echo &&
40+
cat /proc/mounts && echo &&
41+
ls -al /sys/fs/cgroup && echo &&
42+
uname -a && echo &&
43+
stat -fc %T /sys/fs/cgroup && echo &&
44+
cat /proc/self/cgroup && echo &&
45+
cat /proc/cpuinfo
46+
- name: pstree
47+
run: pstree -p
48+
- name: Install DOMjudge
49+
run: .github/jobs/baseinstall.sh all
50+
- name: Check nginx
51+
run: curl -v https://localhost/domjudge/
52+
- name: Get SQL logs
53+
run: docker logs "${{ job.services.sqlserver.id }}"
54+
- name: Collect docker logs on failure
55+
if: ${{ !cancelled() }}
56+
uses: jwalton/gh-docker-logs@v1
57+
with:
58+
dest: '/tmp/docker-logs'
59+
- name: Upload all logs/artifacts
60+
if: ${{ !cancelled() }}
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: Logs
64+
path: |
65+
/var/log/nginx
66+
/opt/domjudge/domserver/webapp/var/log/*.log
67+
/tmp/docker-logs
68+
/tmp/artifacts
69+
- name: Verify no errors in symfony {prod,test,dev}.log
70+
shell: bash
71+
run: |
72+
if cat /opt/domjudge/domserver/webapp/var/log/*.log | egrep '(CRITICAL|ERROR):'; then
73+
exit 1
74+
fi

0 commit comments

Comments
 (0)