@@ -39,14 +39,18 @@ jobs:
39
39
TEST : [Unit, E2E]
40
40
steps :
41
41
- name : Skip this job when not in a merge queue for some combinations
42
+ id : skip_check
42
43
run : |
43
44
if [ "${{ !contains(github.ref, 'gh-readonly-queue') }}" ]; then
44
45
if [ "${{ matrix.PHPVERSION }}" -ne "8.4" ]; then
45
- exit 0
46
+ echo "::set-output name=skip::true"
46
47
fi
47
48
fi
48
- - uses : actions/checkout@v4
49
+ - name : Get the repository
50
+ if : steps.skip_check.outputs.run == 'true'
51
+ uses : actions/checkout@v4
49
52
- name : info
53
+ if : steps.skip_check.outputs.run == 'true'
50
54
run : |
51
55
cat /proc/cmdline && echo &&
52
56
cat /proc/mounts && echo &&
@@ -56,27 +60,32 @@ jobs:
56
60
cat /proc/self/cgroup && echo &&
57
61
cat /proc/cpuinfo
58
62
- name : pstree
63
+ if : steps.skip_check.outputs.run == 'true'
59
64
run : pstree -p
60
65
- name : Install DOMjudge
66
+ if : steps.skip_check.outputs.run == 'true'
61
67
run : .github/jobs/baseinstall.sh unit install ${{ matrix.PHPVERSION }} test
62
68
- name : Check nginx
69
+ if : steps.skip_check.outputs.run == 'true'
63
70
run : curl -v https://localhost/domjudge/
64
71
- name : Run the unit-tests
72
+ if : steps.skip_check.outputs.run == 'true'
65
73
run : .github/jobs/unit-tests.sh ${{ matrix.PHPVERSION }} ${{ matrix.TEST }}
66
74
- name : Publish Test Results
67
75
uses : EnricoMi/publish-unit-test-result-action@v2
68
- if : ${{ !cancelled() }}
76
+ if : " ${{ steps.skip_check.outputs.run == 'true'}} && ${{ !cancelled() }}"
69
77
with :
70
78
files : /tmp/artifacts/unit-tests.xml
71
79
- name : Get SQL logs
80
+ if : steps.skip_check.outputs.run == 'true'
72
81
run : docker logs "${{ job.services.sqlserver.id }}"
73
82
- name : Collect docker logs on failure
74
- if : ${{ !cancelled() }}
83
+ if : " ${{ steps.skip_check.outputs.run == 'true'}} && ${{ !cancelled() }}"
75
84
uses : jwalton/gh-docker-logs@v1
76
85
with :
77
86
dest : ' /tmp/docker-logs'
78
87
- name : Upload all logs/artifacts
79
- if : ${{ !cancelled() }}
88
+ if : " ${{ steps.skip_check.outputs.run == 'true'}} && ${{ !cancelled() }}"
80
89
uses : actions/upload-artifact@v4
81
90
with :
82
91
name : Logs
86
95
/tmp/docker-logs
87
96
/tmp/artifacts
88
97
- name : Verify no errors in prod.log
98
+ if : steps.skip_check.outputs.run == 'true'
89
99
shell : bash
90
100
run : |
91
101
if cat /opt/domjudge/domserver/webapp/var/log/*.log | egrep '(CRITICAL|ERROR):'; then
0 commit comments