Skip to content

Commit af234f6

Browse files
committed
Fix CI
1 parent 69a951f commit af234f6

File tree

5 files changed

+32
-19
lines changed

5 files changed

+32
-19
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ on:
44
push:
55
jobs:
66
run:
7-
runs-on: ubuntu-latest
7+
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
tag: ["amd64"]
11-
php: ["8.4"]
12-
name: PHP ${{ matrix.php }} Test on ${{ matrix.tag }}
10+
os: [ubuntu-latest]
11+
php-versions: ["8.2", "8.3", "8.4"]
12+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.os }}
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v2
1616

1717
- name: Setup PHP
18-
# Inputs to manual.sh are in this order - php, extensions, ini-values, coverage, tools
19-
run: curl -sL https://setup-php.com/manual.sh | bash -s ${{ matrix.php }} "mbstring, intl, sockets" "memory_limit=-1" "xdebug"
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: ${{ matrix.php-versions }}
21+
extensions: mbstring, intl, sockets
2022

2123
- name: Check environment
2224
run: |
@@ -28,21 +30,28 @@ jobs:
2830
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
2931

3032
- name: Cache dependencies
31-
uses: actions/cache@v3
33+
uses: actions/cache@v4
3234
with:
3335
path: ${{ steps.composercache.outputs.dir }}
34-
key: ${{ matrix.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
35-
restore-keys: ${{ matrix.os }}-composer-${{ matrix.php }}-
36-
37-
- name: Install dependencies
38-
run: composer install --prefer-dist
36+
key: ${{ matrix.os }}-composer-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
37+
restore-keys: ${{ matrix.os }}-composer-${{ matrix.php-versions }}-
3938

40-
- name: Run tests
39+
- name: Run codestyle check
4140
env:
4241
PHP_CS_FIXER_IGNORE_ENV: 1
43-
TOKEN: ${{ secrets.TOKEN }}
44-
DEST: ${{ secrets.DEST }}
4542
run: |
46-
vendor/bin/psalm --no-cache --shepherd
47-
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
4843
vendor/bin/php-cs-fixer --diff --dry-run -v fix
44+
45+
- name: Run unit tests
46+
run: |
47+
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
48+
49+
- name: Run Psalm analysis
50+
run: |
51+
vendor/bin/psalm --shepherd
52+
53+
#- name: Upload coverage reports to Codecov
54+
# uses: codecov/codecov-action@v4.0.1
55+
# with:
56+
# token: ${{ secrets.CODECOV_TOKEN }}
57+
# slug: danog/AsyncOrm

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
}
1212
],
1313
"require": {
14-
"php-64bit": ">=8.2"
14+
"php-64bit": ">=8.2",
15+
"symfony/polyfill-php83": "^1.32"
1516
},
1617
"require-dev": {
1718
"phpunit/phpunit": "^11",

src/FileId.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ public function getBotAPI(): string
273273
if ($this->photoSizeSource !== null) {
274274
$photoSize = $this->photoSizeSource;
275275
if ($this->subVersion < 32) {
276+
assert($this->volumeId !== null);
276277
$fileId .= Tools::packLong($this->volumeId);
277278
}
278279

src/PhotoSizeSource/PhotoSizeSourceDialogPhotoBig.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ final class PhotoSizeSourceDialogPhotoBig extends PhotoSizeSourceDialogPhoto
2929
* Get whether the big or small version of the photo is being used.
3030
*
3131
*/
32+
#[\Override]
3233
public function isSmallDialogPhoto(): bool
3334
{
3435
return false;

src/PhotoSizeSource/PhotoSizeSourceDialogPhotoSmall.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ final class PhotoSizeSourceDialogPhotoSmall extends PhotoSizeSourceDialogPhoto
2929
* Get whether the big or small version of the photo is being used.
3030
*
3131
*/
32+
#[\Override]
3233
public function isSmallDialogPhoto(): bool
3334
{
3435
return true;

0 commit comments

Comments
 (0)