Skip to content

Commit 6fbfde8

Browse files
committed
We need PHPversion in both scripts
Displaying the PHPconfig makes more sense in the shared setup script.
1 parent 22c772b commit 6fbfde8

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.github/jobs/baseinstall.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44

55
export version="$1"
66
db=${2:-install}
7-
phpversion="${3}"
7+
phpversion="${3:-8.1}"
8+
# If this script is called from unit-tests.sh, we use the test environment
9+
export APP_ENV="${4:-prod}"
810

9-
MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}
11+
show_phpinfo $version
1012

11-
# If this script is called from unit-tests.sh, we use the test environment
12-
export APP_ENV="${3:-prod}"
13+
MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}
1314

1415
# In the test environment, we need to use a different database
1516
[ "$APP_ENV" = "prod" ] && DATABASE_NAME=domjudge || DATABASE_NAME=domjudge_test

.github/jobs/unit-tests.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ export version=$1
88
unittest=$2
99
[ "$version" = "8.1" ] && CODECOVERAGE=1 || CODECOVERAGE=0
1010

11-
show_phpinfo $version
12-
1311
# Set up
1412
export unit=1
1513

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: pstree
5252
run: pstree -p
5353
- name: Install DOMjudge
54-
run: .github/jobs/baseinstall.sh unit install test
54+
run: .github/jobs/baseinstall.sh unit install ${{ matrix.PHPVERSION }} test
5555
- name: Check nginx
5656
run: curl -v https://localhost/domjudge/
5757
- name: Run the unit-tests

0 commit comments

Comments
 (0)