Skip to content

Commit ee35f33

Browse files
committed
Run the unit tests
Future commits will massage the file in the right format as its not there yet and gets certain parameters which are not implemented yet. We'll need to play around with the unit test upload features (https://github.com/EnricoMi/publish-unit-test-result-action#configuration) what works best.
1 parent 140a0dd commit ee35f33

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

.github/workflows/unit-tests.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Detect changes to manually verify
1717
run: diff newcodecov .github/jobs/uploadcodecov.sh
1818

19-
integration:
19+
unit-tests:
2020
runs-on: ubuntu-24.04
2121
timeout-minutes: 20
2222
container:
@@ -31,6 +31,10 @@ jobs:
3131
MYSQL_USER: domjudge
3232
MYSQL_PASSWORD: domjudge
3333
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
34+
strategy:
35+
matrix:
36+
PHPVERSION: [8.1, 8.4]
37+
TEST: [Unit, E2E]
3438
steps:
3539
- uses: actions/checkout@v4
3640
- name: info
@@ -45,9 +49,18 @@ jobs:
4549
- name: pstree
4650
run: pstree -p
4751
- name: Install DOMjudge
48-
run: .github/jobs/baseinstall.sh all
52+
run: .github/jobs/baseinstall.sh unit install test
4953
- name: Check nginx
5054
run: curl -v https://localhost/domjudge/
55+
- name: Run the unit-tests
56+
run: .github/jobs/unit-tests.sh ${{ matrix.PHPVERSION }} ${{ matrix.TEST }}
57+
- name: Publish Test Results
58+
uses: EnricoMi/publish-unit-test-result-action@v2
59+
if: ${{ !cancelled() }}
60+
with:
61+
comment_mode: changes in failures
62+
check_name: unit-tests-${{ matrix.PHPVERSION }}-${{ matrix.TEST }}.xml
63+
files: unit-tests-${{ matrix.PHPVERSION }}-${{ matrix.TEST }}.xml
5164
- name: Get SQL logs
5265
run: docker logs "${{ job.services.sqlserver.id }}"
5366
- name: Collect docker logs on failure
@@ -59,15 +72,9 @@ jobs:
5972
if: ${{ !cancelled() }}
6073
uses: actions/upload-artifact@v4
6174
with:
62-
name: Logs
75+
name: Logs-${{ matrix.PHPVERSION }}-${{ matrix.TEST }}
6376
path: |
6477
/var/log/nginx
6578
/opt/domjudge/domserver/webapp/var/log/*.log
6679
/tmp/docker-logs
6780
/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)