Skip to content

Commit

Permalink
ci: add PHP 8.3 to randomized tests (#2721)
Browse files Browse the repository at this point in the history
  • Loading branch information
morrisonlevi authored Jun 21, 2024
1 parent 231d5bd commit 19670e2
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 12 deletions.
12 changes: 8 additions & 4 deletions tests/randomized/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ publish.centos: \
publish.centos.7.4 \
publish.centos.8.0 \
publish.centos.8.1 \
publish.centos.8.2
publish.centos.8.2 \
publish.centos.8.3

publish.buster: \
publish.buster.7.4 \
publish.buster.8.0 \
publish.buster.8.1 \
publish.buster.8.2
publish.buster.8.2 \
publish.buster.8.3

publish.centos.%:
docker buildx bake --push centos-$(*)
Expand All @@ -45,13 +47,15 @@ pull.centos: \
pull.centos.7.4 \
pull.centos.8.0 \
pull.centos.8.1 \
pull.centos.8.2
pull.centos.8.2 \
pull.centos.8.3

pull.buster: \
pull.buster.7.4 \
pull.buster.8.0 \
pull.buster.8.1 \
pull.buster.8.2
pull.buster.8.2 \
pull.buster.8.3

pull.centos.%:
@docker pull $(DOCKER_IMAGE_PREFIX)centos-$(*)-$(DOCKER_IMAGE_VERSION)
Expand Down
2 changes: 1 addition & 1 deletion tests/randomized/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The purpose of randomized tests is to find edge cases that users could encounter

The basic idea is to randomly generate a matrix of application configurations:
- Apache/Nginx
- PHP 7.0-8.2
- PHP 7.0-8.3
- Centos 7 / Debian Buster

and to run a application with randomily generated execution paths, which involve a number of scenarios and integrations.
Expand Down
17 changes: 17 additions & 0 deletions tests/randomized/app/composer-8.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"autoload": {
"psr-4": {
"RandomizedTests\\": "./src/RandomizedTests"
}
},
"config": {
"allow-plugins": {
"php-http/discovery": true
}
},
"require": {
"elasticsearch/elasticsearch": "^8.0",
"guzzlehttp/guzzle": "7.*",
"datadog/dd-trace": "0.82.0"
}
}
2 changes: 2 additions & 0 deletions tests/randomized/config/platforms.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
define('OS', [
'centos7' => [
'php' => [
'8.3',
'8.2',
'8.1',
'8.0',
Expand All @@ -18,6 +19,7 @@
],
'buster' => [
'php' => [
'8.3',
'8.2',
'8.1',
'8.0',
Expand Down
20 changes: 18 additions & 2 deletions tests/randomized/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
centos-7.0:
build:
Expand Down Expand Up @@ -111,3 +109,21 @@ services:
args:
PHP_MAJOR_MINOR: "8.2"
image: 'datadog/dd-trace-ci:php-randomizedtests-buster-8.2-2'

centos-8.3:
build:
context: docker
dockerfile: centos.Dockerfile
x-bake: *bake
args:
PHP_MAJOR_MINOR: "8.3"
image: 'datadog/dd-trace-ci:php-randomizedtests-centos7-8.3-2'

buster-8.3:
build:
context: docker
dockerfile: buster.Dockerfile
x-bake: *bake
args:
PHP_MAJOR_MINOR: "8.3"
image: 'datadog/dd-trace-ci:php-randomizedtests-buster-8.3-2'
2 changes: 1 addition & 1 deletion tests/randomized/docker/buster.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN chmod +x /scripts/wait-for.sh
# - Install golang
RUN set -eux; \
GO_ARCHITECTURE=$(if [ `uname -m` = "aarch64" ]; then echo "arm64"; else echo "amd64"; fi); \
curl -L --output golang.tar.gz https://go.dev/dl/go1.18.3.linux-${GO_ARCHITECTURE}.tar.gz; \
curl -L --output golang.tar.gz https://go.dev/dl/go1.22.1.linux-${GO_ARCHITECTURE}.tar.gz; \
rm -rf /usr/local/go && tar -C /usr/local -xzf golang.tar.gz;
# - Download vegeta
RUN set -eux; \
Expand Down
2 changes: 1 addition & 1 deletion tests/randomized/docker/centos.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RUN chmod +x /scripts/wait-for.sh
# - Install golang
RUN set -eux; \
GO_ARCHITECTURE=$(if [ `uname -m` = "aarch64" ]; then echo "arm64"; else echo "amd64"; fi); \
curl -L --output golang.tar.gz https://go.dev/dl/go1.18.3.linux-${GO_ARCHITECTURE}.tar.gz; \
curl -L --output golang.tar.gz https://go.dev/dl/go1.22.1.linux-${GO_ARCHITECTURE}.tar.gz; \
rm -rf /usr/local/go && tar -C /usr/local -xzf golang.tar.gz;
# - Download vegeta
RUN set -eux; \
Expand Down
4 changes: 1 addition & 3 deletions tests/randomized/lib/templates/docker-compose.template.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.7'

volumes:
composer_cache:

Expand Down Expand Up @@ -42,4 +40,4 @@ services:
networks:
randomized_tests:
name: randomized_tests_baseservices
external: true
external: true

0 comments on commit 19670e2

Please sign in to comment.