Skip to content

Commit 140a0dd

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 933287d commit 140a0dd

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
@@ -16,3 +16,58 @@ jobs:
1616
- name: Detect changes to manually verify
1717
run: diff newcodecov .github/jobs/uploadcodecov.sh
1818

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

0 commit comments

Comments
 (0)