Skip to content

Commit

Permalink
We need PHPversion in both scripts
Browse files Browse the repository at this point in the history
Displaying the PHPconfig makes more sense in the shared setup script.
  • Loading branch information
vmcj committed Dec 7, 2024
1 parent 22c772b commit 6fbfde8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .github/jobs/baseinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

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

MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}
show_phpinfo $version

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

# In the test environment, we need to use a different database
[ "$APP_ENV" = "prod" ] && DATABASE_NAME=domjudge || DATABASE_NAME=domjudge_test
Expand Down
2 changes: 0 additions & 2 deletions .github/jobs/unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export version=$1
unittest=$2
[ "$version" = "8.1" ] && CODECOVERAGE=1 || CODECOVERAGE=0

show_phpinfo $version

# Set up
export unit=1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: pstree
run: pstree -p
- name: Install DOMjudge
run: .github/jobs/baseinstall.sh unit install test
run: .github/jobs/baseinstall.sh unit install ${{ matrix.PHPVERSION }} test
- name: Check nginx
run: curl -v https://localhost/domjudge/
- name: Run the unit-tests
Expand Down

0 comments on commit 6fbfde8

Please sign in to comment.