-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (86 loc) · 2.62 KB
/
Copy pathdocker-compose.yml
File metadata and controls
87 lines (86 loc) · 2.62 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# =============================================================================
# Docker Compose file for testing on different PHP versions.
#
# Usage:
# $ # Download and build the images
# $ docker compose pull && docker compose build
#
# $ # Run the tests in the container for various PHP versions
# $ # ----------------------------------------------------------------------
#
# $ # PHP 5.6.40 is not officially supported but used to check for backwards
# $ # compatibility (still works tho!.)
# $ docker compose run --rm oldest
#
# $ # PHP 7.x is the minimum supported version.
# $ docker compose run --rm min
#
# $ # PHP 8.3 is the maximum supported version.
# $ docker compose run --rm max
#
# $ # PHP 8.4+ (latest) is the experimental version. Currently errors out.
# $ docker compose run --rm latest
#
# $ # Generate PHPDoc documentation.
# $ docker compose run --rm phpdoc
# =============================================================================
services:
# Minimum supported PHP version. It works on PHP 5.3 but the docker image schema
# is v1 which is deprecated. So we treat 5.5 as the minimum supported version.
min:
build:
dockerfile: ./.github/Dockerfile
args:
PHP_VERSION: 5.5-alpine
volumes:
- .:/app
# Officially supported maximum PHP version.
stable:
build:
dockerfile: ./.github/Dockerfile
args:
PHP_VERSION: 8.3-cli-alpine
volumes:
- .:/app
# Latest PHP version.
latest:
build:
dockerfile: ./.github/Dockerfile
args:
PHP_VERSION: cli-alpine
volumes:
- .:/app
# Run examples in latest PHP version as integration tests.
examples:
build:
dockerfile: ./.github/Dockerfile
args:
PHP_VERSION: cli-alpine
volumes:
- .:/app
working_dir: /app
entrypoint: /usr/local/bin/php
command: /app/examples/run-integration-test.php
# Generate PHPDoc documentation.
phpdoc:
image: phpdoc/phpdoc:3
volumes:
- .:/app
working_dir: /app
entrypoint: phpdoc
command: --directory . --filename ./Extension.php --target "docs/" --title "ParsedownToC" --ignore "vendor/" --ignore "examples/" --ignore "tests/"
psalm:
build:
dockerfile: ./.github/Dockerfile
args:
PHP_VERSION: 8.3-cli-alpine
volumes:
- ./.git:/app/.git
- ./examples:/app/examples
- ./Extension.php:/app/Extension.php
- ./composer.json:/app/composer.json
- ./tests/run-psalm.sh:/app/tests/run-psalm.sh
- ./psalm.xml:/app/psalm.xml
working_dir: /app
entrypoint: /app/tests/run-psalm.sh
init: true