build: 升级到 8.2

Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
This commit is contained in:
李东云
2023-10-13 15:06:48 +08:00
parent 64b55e8cfa
commit 7669885181
8 changed files with 11 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
# @link https://studio.luxcreo.cn/ # @link https://studio.luxcreo.cn/
# @contact dongyun.li@luxcreo.cn # @contact dongyun.li@luxcreo.cn
FROM harbor.luxcreo.cn/library/hyperf:8.1-swoole FROM harbor.luxcreo.cn/library/hyperf:8.2-swoole
LABEL maintainer="李东云 <dongyun.li@luxcreo.ai>" version="1.0" license="MIT" app.name="LuxStudio" LABEL maintainer="李东云 <dongyun.li@luxcreo.ai>" version="1.0" license="MIT" app.name="LuxStudio"
## ##
@@ -39,7 +39,7 @@ ENV TIMEZONE=${timezone:-"Asia/Shanghai"} \
# 设置时区 # 设置时区
RUN set -ex \ RUN set -ex \
# ---------- some config ---------- # ---------- some config ----------
&& cd /etc/php81 \ && cd /etc/php82 \
# - config PHP # - config PHP
&& echo "date.timezone=${TIMEZONE}" >> conf.d/99_overrides.ini \ && echo "date.timezone=${TIMEZONE}" >> conf.d/99_overrides.ini \
# - config timezone # - config timezone

View File

@@ -21,7 +21,7 @@
}, },
"pre-push": [ "pre-push": [
"echo committing as $(git config user.name)", "echo committing as $(git config user.name)",
"docker run --rm -t -v \"$(pwd)\":/srv/www harbor.luxcreo.cn/library/hyperf:8.1-swoole composer ci" "docker run --rm -t -v \"$(pwd)\":/srv/www harbor.luxcreo.cn/library/hyperf:8.2-swoole composer ci"
] ]
} }
}, },
@@ -33,7 +33,7 @@
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "psr-4": {
"Test\\": "test/" "Test\\": "tests/"
} }
}, },
"require": { "require": {
@@ -47,7 +47,8 @@
"hyperf/translation": "~3.0.37", "hyperf/translation": "~3.0.37",
"hyperf/validation": "~3.0.37", "hyperf/validation": "~3.0.37",
"singularity/hdk-core": "^1.0.0", "singularity/hdk-core": "^1.0.0",
"symfony/polyfill-php81": "^1.28.0" "symfony/polyfill-php81": "^1.28.0",
"symfony/polyfill-php82": "^1.28.0"
}, },
"require-dev": { "require-dev": {
"brainmaestro/composer-git-hooks": "^2.8.5", "brainmaestro/composer-git-hooks": "^2.8.5",
@@ -85,12 +86,12 @@
"test": [ "test": [
"rm -rf runtime", "rm -rf runtime",
"Composer\\Config::disableProcessTimeout", "Composer\\Config::disableProcessTimeout",
"APP_STATUS=false co-pest --prepend test/bootstrap.php -c phpunit.xml --colors=always $1" "APP_STATUS=false co-pest --prepend tests/bootstrap.php -c phpunit.xml --colors=always $1"
], ],
"cs-fix": "php-cs-fixer fix $1 --rules=@PSR12 --allow-risky=yes", "cs-fix": "php-cs-fixer fix $1 --rules=@PSR12 --allow-risky=yes",
"analyse": "phpstan analyse $1", "analyse": "phpstan analyse $1",
"ci": [ "ci": [
"@analyse app/ config/ test/", "@analyse app/ config/ tests/",
"@cs-fix", "@cs-fix",
"@test", "@test",
"echo CI Success" "echo CI Success"

View File

@@ -8,4 +8,4 @@ docker run \
-v "$(pwd)":/srv/www \ -v "$(pwd)":/srv/www \
-v ~/.ssh:/root/.ssh \ -v ~/.ssh:/root/.ssh \
-p $port:9501 \ -p $port:9501 \
harbor.luxcreo.cn/library/hyperf:8.1-swoole /bin/ash harbor.luxcreo.cn/library/hyperf:8.2-swoole /bin/ash

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="./test/bootstrap.php" bootstrap="./tests/bootstrap.php"
colors="true" colors="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true"> <coverage processUncoveredFiles="true">
@@ -10,7 +10,7 @@
</coverage> </coverage>
<testsuites> <testsuites>
<testsuite name="Tests"> <testsuite name="Tests">
<directory>./test</directory> <directory>./tests</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
</phpunit> </phpunit>