Skip to content

Commit 1d14bf1

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.
1 parent 9a10339 commit 1d14bf1

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/unit-tests.yml

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

20-
integration:
20+
unit-tests:
2121
runs-on: ubuntu-24.04
2222
timeout-minutes: 20
2323
container:
@@ -32,6 +32,10 @@ jobs:
3232
MYSQL_USER: domjudge
3333
MYSQL_PASSWORD: domjudge
3434
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
35+
strategy:
36+
matrix:
37+
PHPVERSION: [8.1, 8.4]
38+
TEST: [Unit, E2E]
3539
steps:
3640
- uses: actions/checkout@v4
3741
- name: info
@@ -46,9 +50,17 @@ jobs:
4650
- name: pstree
4751
run: pstree -p
4852
- name: Install DOMjudge
49-
run: .github/jobs/baseinstall.sh all
53+
run: .github/jobs/baseinstall.sh unit install test
5054
- name: Check nginx
5155
run: curl -v https://localhost/domjudge/
56+
- name: Run the unit-tests
57+
run: .github/jobs/unit-tests.sh ${{ matrix.PHPVERSION }} ${{ matrix.TEST }}
58+
- name: Publish Test Results
59+
uses: EnricoMi/publish-unit-test-result-action@v2
60+
if: ${{ !cancelled() }}
61+
with:
62+
check-name: unit-tests-${{ matrix.PHPVERSION }}-${{ matrix.TEST }}.xml
63+
files: unit-tests-${{ matrix.PHPVERSION }}-${{ matrix.TEST }}.xml
5264
- name: Get SQL logs
5365
run: docker logs "${{ job.services.sqlserver.id }}"
5466
- name: Collect docker logs on failure
@@ -60,7 +72,7 @@ jobs:
6072
if: ${{ !cancelled() }}
6173
uses: actions/upload-artifact@v4
6274
with:
63-
name: Logs
75+
name: Logs-${{ matrix.PHPVERSION }}-${{ matrix.TEST }}
6476
path: |
6577
/var/log/nginx
6678
/opt/domjudge/domserver/webapp/var/log/*.log

0 commit comments

Comments
 (0)