1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 07:58:58 +01:00

Test database as well
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Daniil Gentili 2022-06-23 14:31:41 +02:00
parent 931cb7f231
commit c5588bb626
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 30 additions and 6 deletions

View File

@ -10,7 +10,9 @@ matrix:
clone: clone:
git: git:
when: when:
event: tag event:
- tag
- push
image: woodpeckerci/plugin-git image: woodpeckerci/plugin-git
settings: settings:
depth: 1 depth: 1
@ -36,3 +38,20 @@ pipeline:
commands: commands:
- tests/makephar.sh - tests/makephar.sh
services:
mariadb:
image: mariadb
environment:
- MARIADB_DATABASE=MadelineProto
- MARIADB_USER=MadelineProto
- MARIADB_PASSWORD=test
postgres:
image: postgres
environment:
- POSTGRES_DB=MadelineProto
- POSTGRES_USER=MadelineProto
- POSTGRES_PASSWORD=test
redis:
image: redis

View File

@ -6,6 +6,10 @@ export PATH="$HOME/.local/php/$PHP_VERSION:$PATH"
echo "$TAG" | grep -q '\.9999' && exit 0 || true echo "$TAG" | grep -q '\.9999' && exit 0 || true
echo "$TAG" | grep -q '\.9998' && exit 0 || true echo "$TAG" | grep -q '\.9998' && exit 0 || true
if [ "$TAG" == "" ]; then
export TAG=7777
fi
PHP_MAJOR_VERSION=$(php -r 'echo PHP_MAJOR_VERSION;') PHP_MAJOR_VERSION=$(php -r 'echo PHP_MAJOR_VERSION;')
PHP_MINOR_VERSION=$(php -r 'echo PHP_MINOR_VERSION;') PHP_MINOR_VERSION=$(php -r 'echo PHP_MINOR_VERSION;')
php=$PHP_MAJOR_VERSION$PHP_MINOR_VERSION php=$PHP_MAJOR_VERSION$PHP_MINOR_VERSION
@ -94,7 +98,6 @@ runTestSimple()
} }
runTest() runTest()
{ {
[ "$1" != "" ] && p="$1" || p=php
echo "m echo "m
$API_ID $API_ID
$API_HASH $API_HASH
@ -158,7 +161,9 @@ input=$PWD
cd "$madelinePath" cd "$madelinePath"
cp "$input/madeline$php$branch.phar" "madeline$php.phar" if [ "$TAG" != "7777" ]; then
git remote add hub https://github.com/danog/MadelineProto cp "$input/madeline$php$branch.phar" "madeline$php.phar"
gh release upload "$TAG" "madeline$php.phar" git remote add hub https://github.com/danog/MadelineProto
rm "madeline$php.phar" gh release upload "$TAG" "madeline$php.phar"
rm "madeline$php.phar"
fi