Skip to content

Commit 7b8bf45

Browse files
author
Michael Vasseur
committed
Allow testing against MySQL
1 parent b402f0c commit 7b8bf45

File tree

1 file changed

+10
-45
lines changed

1 file changed

+10
-45
lines changed

.github/workflows/unit-tests.yml

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,25 @@ jobs:
1212
unit-tests:
1313
services:
1414
sqlserver:
15-
image: mariadb
15+
image: ${{ matrix.SQL }}
1616
ports:
1717
- 3306:3306
1818
env:
1919
MYSQL_ROOT_PASSWORD: root
20-
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
20+
options: ${{ matrix.SQL_OPTIONS }}
2121
container:
2222
image: domjudge/gitlabci:24.04
2323
strategy:
2424
matrix:
2525
PHPVERSION: [8.1]
26-
TEST: [UNIT]
26+
TEST: [UNIT,E2E]
27+
CRAWL_SHADOW_MODE: [0]
28+
SQL_OPTIONS: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
29+
include:
30+
- PHPVERSION: 8.4
31+
TEST: UNIT
32+
SQL: mysql
33+
SQL_OPTIONS: --mysql-native-password --authentication_policy=mysql_native_password
2734
runs-on: ubuntu-latest
2835
steps:
2936
- uses: actions/checkout@v4
@@ -48,45 +55,3 @@ jobs:
4855
with:
4956
name: unit-test-output
5057
path: /tmp/artifacts
51-
#.unit_job:
52-
# script:
53-
# - set -eux
54-
# - if [ -z ${PHPVERSION+x} ]; then export PHPVERSION=8.1; fi
55-
# - if [ -z ${TEST+x} ]; then export TEST="UNIT"; fi
56-
# - if [ "$TEST" = "UNIT" ] && [ "$CRAWL_SHADOW_MODE" != "0" ]; then exit 0; fi
57-
# - if [ "$TEST" = "E2E" ] && [ "$CRAWL_SHADOW_MODE" != "0" ] && [ "$CI_COMMIT_BRANCH" != "main" ]; then exit 0; fi
58-
# - export CRAWL_SHADOW_MODE
59-
# - ./gitlab/unit-tests.sh $PHPVERSION $TEST
60-
# artifacts:
61-
# when: always
62-
# paths:
63-
# - unit-tests.xml
64-
# - coverage-html
65-
# - deprecation.txt
66-
# - duration
67-
# - gitlabartifacts
68-
# reports:
69-
# junit:
70-
# - unit-tests.xml
71-
#
72-
#run unit tests:
73-
# only:
74-
# - main
75-
# - /^[0-9].[0-9]$/
76-
# extends: [.mariadb_job,.phpsupported_job,.unit_job]
77-
#
78-
#run unit tests (PR):
79-
# except:
80-
# - main
81-
# - /^[0-9].[0-9]$/
82-
# extends: [.mariadb_job,.phpsupported_job_pr,.unit_job]
83-
#
84-
#run unit tests (MySQL):
85-
# only:
86-
# - main
87-
# - /^[0-9].[0-9]$/
88-
# extends: [.mysql_job,.unit_job]
89-
# parallel:
90-
# matrix:
91-
# - TEST: ["E2E","Unit"]
92-
# CRAWL_SHADOW_MODE: ["0"]

0 commit comments

Comments
 (0)