File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Lint
1+ name : Coding standards
22on : [push]
33jobs :
44 lint :
5- name : PHP Lint
5+ name : Coding standards
66 runs-on : ubuntu-latest
7+ strategy :
8+ fail-fast : false
9+ matrix :
10+ php : [ '8.2', '8.3' ]
11+
712 steps :
13+ - name : Checkout
14+ uses : actions/checkout@v2
15+
816 - name : Setup PHP
917 uses : shivammathur/setup-php@v2
1018 with :
11- php-version : 8.1
19+ php-version : ${{ matrix.php }}
20+ tools : composer:v2
21+
22+ - name : Setup cache
23+ run : echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
1224
13- - name : Cache Composer dependencies
25+ - name : Cache dependencies installed with composer
1426 uses : actions/cache@v2
1527 with :
16- path : /tmp/composer-cache
17- key : ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
28+ path : ${{ env.COMPOSER_CACHE_DIR }}
29+ key : php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
30+ restore-keys : |
31+ php${{ matrix.php }}-composer-latest-
32+
33+ - name : Update composer
34+ run : composer self-update
35+
36+ - name : Install dependencies with composer
37+ run : composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
1838
19- - uses : actions/checkout@master
20- - name : lint
39+ - name : Run code quality analysis
2140 run : make lint
Original file line number Diff line number Diff line change 1- name : Test
1+ name : Tests
22on : [push]
33jobs :
4- lint :
5- name : PHP Test
6- runs-on : ubuntu-latest
7- steps :
8- - name : Setup PHP
9- uses : shivammathur/setup-php@v2
10- with :
11- php-version : 8.1
4+ test :
5+ name : Tests
6+ runs-on : ubuntu-latest
7+ strategy :
8+ fail-fast : false
9+ matrix :
10+ php : [ '8.2', '8.3' ]
1211
13- - name : Cache Composer dependencies
14- uses : actions/cache@v2
15- with :
16- path : /tmp/composer-cache
17- key : ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v2
1815
19- - uses : actions/checkout@master
20- - name : test
21- run : make test
16+ - name : Setup PHP
17+ uses : shivammathur/setup-php@v2
18+ with :
19+ php-version : ${{ matrix.php }}
20+ tools : composer:v2
21+
22+ - name : Setup cache
23+ run : echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
24+
25+ - name : Cache dependencies installed with composer
26+ uses : actions/cache@v2
27+ with :
28+ path : ${{ env.COMPOSER_CACHE_DIR }}
29+ key : php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
30+ restore-keys : |
31+ php${{ matrix.php }}-composer-latest-
32+
33+ - name : Update composer
34+ run : composer self-update
35+
36+ - name : Install dependencies with composer
37+ run : composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
38+
39+ - name : Run tests
40+ run : make test
Original file line number Diff line number Diff line change 11.DEFAULT_GOAL := help
22
3- # -----------------------------------
4- # Variables
5- # -----------------------------------
6- is_docker := $(shell docker info > /dev/null 2>&1 && echo 1)
7- user := $(shell id -u)
8- group := $(shell id -g)
9-
10- ifeq ($(is_docker ) , 1)
11- php := USER_ID=$(user) GROUP_ID=$(group) docker-compose run --rm --no-deps php
12- composer := $(php) composer
13- else
14- php := php
15- composer := composer
16- endif
17-
183# -----------------------------------
194# Recipes
205# -----------------------------------
@@ -24,17 +9,17 @@ help: ## affiche cet aide
249
2510.PHONY : lint
2611lint : vendor/autoload.php # # affiche les erreurs de formatage de code
27- $( php ) vendor/bin/ecs
28- $( php ) vendor/bin/phpstan
12+ php vendor/bin/ecs
13+ php vendor/bin/phpstan
2914
3015.PHONY : test
3116test : vendor/autoload.php # # lance les tests
32- $( php ) vendor/bin/phpunit
17+ php vendor/bin/phpunit
3318
3419.PHONY : lint-fix
3520lint-fix : vendor/autoload.php # # corrige les erreurs de formatage de code
36- $( php ) vendor/bin/ecs --fix
21+ php vendor/bin/ecs --fix
3722
3823vendor/autoload.php : composer.lock # installe les dépendances PHP
39- $( composer ) update
40- $( composer ) dump-autoload
24+ composer update
25+ composer dump-autoload
Original file line number Diff line number Diff line change 3434 "symfony/var-dumper" : " ^6.1|^7.0"
3535 },
3636 "require" : {
37- "php" : " >=8.1 " ,
37+ "php" : " >=8.2 " ,
3838 "symfony/http-client" : " ^6.1|^7.0" ,
3939 "symfony/serializer" : " ^6.1|^7.0" ,
4040 "symfony/property-access" : " ^6.1|^7.0" ,
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ final class VideoFile
4646 public string $ link ;
4747
4848 /**
49- * @var string |null frame rate of the video_file.
49+ * @var float |null frame rate of the video_file.
5050 */
51- public ?string $ fps = null ;
51+ public ?float $ fps = null ;
5252}
Original file line number Diff line number Diff line change 1717 "file_type" : " video/mp4" ,
1818 "width" : 1080 ,
1919 "height" : 1920 ,
20- "link" : " https://player.vimeo.com/external/342571552.hd.mp4?s=6aa6f164de3812abadff3dde86d19f7a074a8a66&profile_id=175&oauth2_token_id=57447761"
20+ "link" : " https://player.vimeo.com/external/342571552.hd.mp4?s=6aa6f164de3812abadff3dde86d19f7a074a8a66&profile_id=175&oauth2_token_id=57447761" ,
21+ "fps" : 30
2122 },
2223 {
2324 "id" : 125005 ,
You can’t perform that action at this time.
0 commit comments