Skip to content

Commit eb8b12a

Browse files
committed
👷 improve CI
1 parent d811b78 commit eb8b12a

7 files changed

Lines changed: 54 additions & 11 deletions

File tree

.github/workflows/build.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ jobs:
8585
with_oneupbundle: false
8686
max_deprecations: 0
8787
- php: '8.3'
88-
symfony: '7.2.*'
88+
symfony: '7.3.*'
8989
dependencies: highest
9090
with_imagine: false
9191
with_oneupbundle: false
9292
max_deprecations: 0
9393
- php: '8.4'
94-
symfony: '7.3.*@dev'
94+
symfony: '7.4.*@dev'
9595
dependencies: highest
9696
with_imagine: false
9797
with_oneupbundle: false
@@ -111,11 +111,9 @@ jobs:
111111
php-version: ${{ matrix.php }}
112112
extensions: mongodb-stable, pdo_sqlite
113113
- run: composer require --no-update doctrine/annotations:^1.14
114-
- run: |
115-
sed -i 's/"league\/flysystem": "<2.0"/"league\/flysystem": "<2.0",\n"symfony\/http-kernel": "6.4.*,>6.4.8 || 7.1.*,>7.1.1"/' composer.json
116114
- run: |
117115
composer global config --no-plugins allow-plugins.symfony/flex true
118-
composer global require --no-interaction --no-progress symfony/flex:^2.2
116+
composer global require --no-interaction --no-progress symfony/flex:^2.8
119117
composer config extra.symfony.require ${{ matrix.symfony }}
120118
if: matrix.symfony != '*'
121119
- name: use possible dev deps

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ make test TEST="Tests/Util/FilenameUtilsTest.php"
4949

5050
will allow testing single Test classes.
5151

52-
Four environments are available: PHP 8.1, PHP 8.2, PHP 8.3, and PHP 8.4.
52+
Five environments are available: PHP 8.1, PHP 8.2, PHP 8.3, PHP 8.4, and PHP 8.5.
5353
The default environment is *PHP 8.1*. If you want to execute tests against
5454
other PHP versions, please use the environment variables as this:
5555

docker/Dockerfile82

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ WORKDIR /srv/vich-uploader
3838
COPY . ./
3939

4040
RUN set -eux; \
41-
sed -i 's/"league\/flysystem": "<2.0"/"league\/flysystem": "<2.0", "symfony\/http-kernel": "6.0.*,>6.4.8 || 7.1.*,>7.1.1"/' composer.json; \
4241
composer update --prefer-dist --ignore-platform-reqs; \
4342
composer clear-cache
4443

docker/Dockerfile83

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ WORKDIR /srv/vich-uploader
3838
COPY . ./
3939

4040
RUN set -eux; \
41-
sed -i 's/"league\/flysystem": "<2.0"/"league\/flysystem": "<2.0", "symfony\/http-kernel": "6.0.*,>6.4.8 || 7.1.*,>7.1.1"/' composer.json; \
4241
composer update --prefer-dist --ignore-platform-reqs; \
4342
composer clear-cache
4443

docker/Dockerfile84

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ WORKDIR /srv/vich-uploader
3838
COPY . ./
3939

4040
RUN set -eux; \
41-
sed -i 's/"league\/flysystem": "<2.0"/"league\/flysystem": "<2.0", "symfony\/http-kernel": "6.0.*,>6.4.8 || 7.1.*,>7.1.1"/' composer.json; \
4241
composer update --prefer-dist --ignore-platform-reqs; \
4342
composer clear-cache
4443

docker/Dockerfile85

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
FROM php:8.5.0beta1-alpine
2+
3+
# TODO this doesn't work for now. It looks like there's no Mongo available for PHP 8.5 yet
4+
ARG MONGODB_VERSION=2.1.1
5+
6+
# Install mongo
7+
RUN set -eux; \
8+
apk add --no-cache --virtual .build-deps \
9+
$PHPIZE_DEPS \
10+
openssl-dev \
11+
; \
12+
pecl install \
13+
mongodb-${MONGODB_VERSION} \
14+
; \
15+
docker-php-ext-enable \
16+
mongodb \
17+
; \
18+
pecl clear-cache; \
19+
\
20+
runDeps="$( \
21+
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
22+
| tr ',' '\n' \
23+
| sort -u \
24+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
25+
)"; \
26+
apk add --no-cache --virtual .api-add-phpexts-rundeps $runDeps \
27+
curl \
28+
;
29+
30+
RUN curl -s https://getcomposer.org/installer | php
31+
32+
RUN mv composer.phar /usr/local/bin/composer
33+
34+
WORKDIR /srv/vich-uploader
35+
36+
# prevent the reinstallation of vendors at every changes in the source code
37+
38+
#COPY ./docker/script/runTests.sh ./runTests.sh
39+
COPY . ./
40+
41+
RUN set -eux; \
42+
composer update --prefer-dist --ignore-platform-reqs; \
43+
composer clear-cache
44+
45+
CMD ["/init"]

tests/VichUploaderBundleTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ final class VichUploaderBundleTest extends TestCase
2020
{
2121
protected function setUp(): void
2222
{
23-
if (SimpleAppKernel::VERSION_ID >= 70200) { // @phpstan-ignore-line
24-
self::markTestSkipped('Kernels above 7.1.0 are not supported in these tests');
23+
if (\PHP_VERSION_ID <= 80200) {
24+
self::markTestSkipped('PHP 8.1 is not supported in these tests');
25+
}
26+
if (SimpleAppKernel::VERSION_ID >= 60400) { // @phpstan-ignore-line
27+
self::markTestSkipped('Kernels above 6.4.0 are not supported in these tests');
2528
}
2629
}
2730

0 commit comments

Comments
 (0)