1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 06:39:01 +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: depends_on:
- build-docker - build-docker
- test - 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 - apk add bash
- tests/test.sh phpunit - tests/test.sh phpunit
test_pr: test_light:
group: test group: test
image: danog/madelineproto:next image: danog/madelineproto:next
when: when:
@ -48,7 +48,7 @@ steps:
- apk add bash - apk add bash
- tests/test.sh phpunit-light - tests/test.sh phpunit-light
cs: psalm:
group: test group: test
image: danog/madelineproto:next image: danog/madelineproto:next
when: when:
@ -58,7 +58,7 @@ steps:
- push - push
commands: commands:
- apk add bash - apk add bash
- tests/test.sh cs - tests/test.sh psalm
handshake: handshake:
group: test group: test
@ -71,3 +71,6 @@ steps:
commands: commands:
- apk add bash - apk add bash
- tests/test.sh handshake - 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); $resultMTProto = self::sendMessage(message: "```\n".Tools::markdownCodeblockEscape($html)."\n```", parse_mode: $mode);
$result = self::MTProtoToBotAPI($resultMTProto); $result = self::MTProtoToBotAPI($resultMTProto);
$this->assertEquals($html, rtrim($result['text'])); $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']); $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 php tests/lock_setup.php
if [ "$1" == "cs" ]; then if [ "$1" == "cs" ]; then
composer psalm
rmdir docs rmdir docs
curl -L https://github.com/danog/MadelineProtoDocs/archive/refs/heads/master.tar.gz | tar -xz curl -L https://github.com/danog/MadelineProtoDocs/archive/refs/heads/master.tar.gz | tar -xz
mv MadelineProtoDocs-master/ docs mv MadelineProtoDocs-master/ docs
@ -43,6 +41,11 @@ if [ "$1" == "handshake" ]; then
exit 0 exit 0
fi fi
if [ "$1" == "psalm" ]; then
composer psalm
exit 0
fi
if [ "$1" == "phpunit" ]; then if [ "$1" == "phpunit" ]; then
composer test composer test
exit 0 exit 0