-
Notifications
You must be signed in to change notification settings - Fork 260
61 lines (59 loc) · 1.82 KB
/
unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Unit tests
# We can speedup with: https://github.com/actions/cache
on:
push:
merge_group:
pull_request:
branches:
- main
- '[0-9]+.[0-9]+'
jobs:
check-static-codecov:
runs-on: ubuntu-latest
steps:
- name: Keep the original job as its 'required'
run: exit 0
unit-tests:
strategy:
matrix:
PHPVERSION: [8.1]
TEST: [Unit, E2E]
CRAWL_SHADOW_MODE: [0]
SQL_OPTIONS: [--health-cmd="healthcheck.sh --connect --innodb_initialized"]
SQL: [mariadb]
#include:
# - PHPVERSION: 8.4
# TEST: Unit
# SQL: mysql
# SQL_OPTIONS: --health-cmd="mysqladmin ping"
services:
sqlserver:
image: ${{ matrix.SQL }}
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
options: ${{ matrix.SQL_OPTIONS }} --health-interval=10s --health-timeout=5s --health-retries=3 --max-allowed-packet=67108864 --wait-timeout3600 --interactive-timeout=3600
container:
image: domjudge/gitlabci:24.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download latest codecov upload script
run: wget https://codecov.io/bash -O newcodecov
- name: Detect changes to manually verify
run: diff newcodecov .github/jobs/uploadcodecov.sh
- name: Run the unit tests
run: .github/jobs/unit-tests.sh ${{ matrix.PHPVERSION }} ${{ matrix.TEST }}
- name: Upload artifact for debugging
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: unit-test-output
path: /tmp/artifacts
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: ${{ !cancelled() }}
with:
files: |
unit-tests.xml