Merge pull request #840 from alexander-schranz/feature/github-action
This commit is contained in:
commit
df823d86eb
6 changed files with 90 additions and 9 deletions
80
.github/workflows/test.yaml
vendored
Normal file
80
.github/workflows/test.yaml
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
pull_request: ~
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: "PHP ${{ matrix.php-version }} ${{ matrix.dependency-versions }} ${{ matrix.composer-stability }}"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
PHPUNIT_VERSION: ${{ matrix.phpunit-version }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- php-version: '5.3'
|
||||
phpunit-version: 4
|
||||
dependency-versions: 'lowest'
|
||||
- php-version: '5.4'
|
||||
phpunit-version: 4
|
||||
- php-version: '5.5'
|
||||
phpunit-version: 4
|
||||
- php-version: '5.6'
|
||||
- php-version: '7.0'
|
||||
- php-version: '7.1'
|
||||
- php-version: '7.2'
|
||||
- php-version: '7.3'
|
||||
- php-version: '7.4'
|
||||
- php-version: '8.0'
|
||||
- php-version: '8.1'
|
||||
- php-version: '8.1'
|
||||
dependency-versions: 'highest'
|
||||
composer-stability: 'dev'
|
||||
|
||||
steps:
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install and configure PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
tools: composer:v2
|
||||
coverage: none
|
||||
|
||||
- name: Install phpunit
|
||||
if: ${{ matrix.phpunit-version }}
|
||||
run: |
|
||||
composer remove symfony/phpunit-bridge --dev
|
||||
wget -O phpunit "https://phar.phpunit.de/phpunit-${{ matrix.phpunit-version }}.phar"
|
||||
chmod +x phpunit
|
||||
composer require "roave/security-advisories" dev-master --no-update
|
||||
|
||||
- name: Set composer stability
|
||||
if: ${{ matrix.composer-stability }}
|
||||
run: composer config minimum-stability ${{ matrix.composer-stability }}
|
||||
|
||||
- name: Install composer dependencies
|
||||
uses: ramsey/composer-install@v1
|
||||
with:
|
||||
dependency-versions: ${{ matrix.dependency-versions }}
|
||||
|
||||
- name: Install ffmpeg
|
||||
uses: FedericoCarboni/setup-ffmpeg@v1
|
||||
|
||||
- name: Run tests
|
||||
if: ${{ matrix.phpunit-version }}
|
||||
run: |
|
||||
if [ "$PHPUNIT_VERSION" ]; then
|
||||
./phpunit --verbose
|
||||
else
|
||||
./vendor/bin/simple-phpunit --verbose
|
||||
fi;
|
||||
|
|
@ -39,10 +39,10 @@ class AddMetadataFilter implements AudioFilterInterface
|
|||
$meta = $this->metaArr;
|
||||
|
||||
if (is_null($meta)) {
|
||||
return ['-map_metadata', '-1', '-vn'];
|
||||
return array('-map_metadata', '-1', '-vn');
|
||||
}
|
||||
|
||||
$metadata = [];
|
||||
$metadata = array();
|
||||
|
||||
if (array_key_exists("artwork", $meta)) {
|
||||
array_push($metadata, "-i", $meta['artwork'], "-map", "0", "-map", "1");
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class ExtractMultipleFramesFilter implements VideoFilterInterface
|
|||
private $frameFileType = 'jpg';
|
||||
|
||||
/** @var array */
|
||||
private static $supportedFrameFileTypes = ['jpg', 'jpeg', 'png'];
|
||||
private static $supportedFrameFileTypes = array('jpg', 'jpeg', 'png');
|
||||
|
||||
public function __construct($frameRate = self::FRAMERATE_EVERY_SEC, $destinationFolder = __DIR__, $priority = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ class AudioConcatenationTest extends FunctionalTestCase
|
|||
{
|
||||
$ffmpeg = $this->getFFMpeg();
|
||||
|
||||
$files = [
|
||||
$files = array(
|
||||
realpath(__DIR__ . '/../files/Jahzzar_-_05_-_Siesta.mp3'),
|
||||
realpath(__DIR__ . '/../files/02_-_Favorite_Secrets.mp3'),
|
||||
];
|
||||
);
|
||||
|
||||
$audio = $ffmpeg->open(reset($files));
|
||||
|
||||
|
|
|
|||
|
|
@ -695,12 +695,13 @@ class VideoTest extends AbstractStreamableTestCase
|
|||
->method('getConfiguration')
|
||||
->will($this->returnValue($configuration));
|
||||
|
||||
$self = $this;
|
||||
|
||||
$driver->expects($this->exactly(1))
|
||||
->method('command')
|
||||
->with($this->isType('array'), false, $this->anything())
|
||||
->will($this->returnCallback(function ($commands, $errors, $listeners) {
|
||||
var_dump($commands);
|
||||
$this->assertTrue(!in_array('-b:v', $commands));
|
||||
->will($this->returnCallback(function ($commands, $errors, $listeners) use ($self) {
|
||||
$self->assertTrue(!in_array('-b:v', $commands));
|
||||
}));
|
||||
|
||||
$video = new Video(__FILE__, $driver, $ffprobe);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class WaveformTest extends AbstractMediaTestCase
|
|||
->method('command')
|
||||
->with($commands);
|
||||
|
||||
$waveform = new Waveform($this->getAudioMock(__FILE__), $driver, $ffprobe, 640, 120, ['#FFFFFF']);
|
||||
$waveform = new Waveform($this->getAudioMock(__FILE__), $driver, $ffprobe, 640, 120, array('#FFFFFF'));
|
||||
$this->assertSame($waveform, $waveform->save($pathfile));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue