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

Split steps even more

This commit is contained in:
Daniil Gentili 2023-11-30 21:02:26 +01:00
parent 1168feae36
commit 61cc0cff2b
5 changed files with 47 additions and 6 deletions

View File

@ -64,3 +64,4 @@ services:
depends_on:
- build-docker
- test
- cs

35
.woodpecker/.cs.yml Normal file
View File

@ -0,0 +1,35 @@
matrix:
php:
- "8.1"
platform:
- linux/aarch64
labels:
platform: ${platform}
clone:
git:
when:
event:
- tag
- push
- pull_request
image: woodpeckerci/plugin-git:2.1.0
settings:
depth: 1
lfs: false
recursive: false
tags: true
steps:
cs:
group: test
image: danog/madelineproto:next
when:
event:
- pull_request
- tag
- push
commands:
- apk add bash
- tests/test.sh cs

View File

@ -37,7 +37,7 @@ steps:
- apk add bash
- tests/test.sh phpunit
test_pr:
test_light:
group: test
image: danog/madelineproto:next
when:
@ -48,7 +48,7 @@ steps:
- apk add bash
- tests/test.sh phpunit-light
cs:
psalm:
group: test
image: danog/madelineproto:next
when:
@ -58,7 +58,7 @@ steps:
- push
commands:
- apk add bash
- tests/test.sh cs
- tests/test.sh psalm
handshake:
group: test
@ -71,3 +71,6 @@ steps:
commands:
- apk add bash
- tests/test.sh handshake
depends_on:
- build-docker

View File

@ -89,7 +89,6 @@ class EntitiesTest extends TestCase
$resultMTProto = self::sendMessage(message: "```\n".Tools::markdownCodeblockEscape($html)."\n```", parse_mode: $mode);
$result = self::MTProtoToBotAPI($resultMTProto);
$this->assertEquals($html, rtrim($result['text']));
$result['entities'][0]['language'] = ''; // Telegram now has automatic language detection
$this->assertEquals([['offset' => 0, 'length' => StrTools::mbStrlen($html), 'language' => '', 'type' => 'pre']], $result['entities']);
}
}

View File

@ -20,8 +20,6 @@ php tests/jit.php
php tests/lock_setup.php
if [ "$1" == "cs" ]; then
composer psalm
rmdir docs
curl -L https://github.com/danog/MadelineProtoDocs/archive/refs/heads/master.tar.gz | tar -xz
mv MadelineProtoDocs-master/ docs
@ -43,6 +41,11 @@ if [ "$1" == "handshake" ]; then
exit 0
fi
if [ "$1" == "psalm" ]; then
composer psalm
exit 0
fi
if [ "$1" == "phpunit" ]; then
composer test
exit 0