-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (22 loc) · 1.01 KB
/
Copy pathMakefile
File metadata and controls
26 lines (22 loc) · 1.01 KB
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
PHP_VERSIONS = 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
TEST_TARGETS = $(addprefix test-,$(PHP_VERSIONS))
.PHONY: help test $(TEST_TARGETS)
help:
@echo "Usage: make <target>"
@echo ""
@echo "Targets:"
@echo " test Run tests on all supported PHP versions"
@echo " test-<version> Run tests on a specific PHP version (e.g., make test-8.1)"
@echo ""
@echo "Supported versions: $(PHP_VERSIONS)"
test: $(TEST_TARGETS)
$(TEST_TARGETS): test-%:
@echo ">>> Running tests on PHP $*"
docker run --rm -v $(CURDIR):/app -w /app mileschou/phalcon:$*-cli \
sh -c "echo 'deb http://archive.debian.org/debian buster main' > /etc/apt/sources.list && \
echo 'deb http://archive.debian.org/debian-security buster/updates main' >> /etc/apt/sources.list || true && \
apt-get update -o Acquire::Check-Valid-Until=false && \
apt-get install -y curl git unzip && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
composer update --no-interaction && \
./vendor/bin/phpunit"