Skip to content

Commit 663dba0

Browse files
committed
added php 7.4 and 8.0 to run_docker_tests script
1 parent e43d515 commit 663dba0

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

docker-compose.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@ services:
1010
volumes:
1111
- .:/app
1212

13+
phpunit-8.0:
14+
build:
15+
context: .
16+
dockerfile: docker/Dockerfile
17+
args:
18+
- PHP_VERSION=8.2
19+
command: ["sh", "-c", "php -v && vendor/bin/phpunit"]
20+
volumes:
21+
- .:/app
22+
23+
phpunit-7.4:
24+
build:
25+
context: .
26+
dockerfile: docker/Dockerfile
27+
args:
28+
- PHP_VERSION=8.2
29+
command: ["sh", "-c", "php -v && vendor/bin/phpunit"]
30+
volumes:
31+
- .:/app
32+
1333
phpunit-7.2:
1434
build:
1535
context: .

run_docker_tests.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/bin/bash
22

3-
PHP_VERSIONS=("7.2" "8.2")
3+
# Check prerequisites
4+
if ! command -v docker &> /dev/null || ! command -v docker-compose &> /dev/null; then
5+
echo -e "\e[31mError: Docker and Docker Compose are required. Please install them before running this script.\e[0m"
6+
exit 1
7+
fi
8+
9+
PHP_VERSIONS=("7.2" "7.4" "8.0" "8.2")
410
TESTS_PASSED=true
511

612
function run_phpunit_tests() {

0 commit comments

Comments
 (0)