1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-04-21 15:21:51 +02:00

added build on macos

This commit is contained in:
Ne-Lexa 2021-02-23 15:54:47 +03:00
parent 620065ac5b
commit a85288d34b
2 changed files with 20 additions and 11 deletions

View File

@ -19,6 +19,7 @@ jobs:
os:
- ubuntu-latest
- windows-latest
- macos-latest
php:
- '7.4'
- '8.0'
@ -35,6 +36,16 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install unzip p7zip-full
-
name: Install windows dependencies
if: matrix.os == 'windows-latest'
run: choco install zip unzip 7zip
-
name: Install macos dependencies
if: matrix.os == 'macos-latest'
run: brew install zip unzip p7zip
-
name: Install PHP with extensions
uses: shivammathur/setup-php@v2
@ -46,20 +57,20 @@ jobs:
tools: composer:v2
-
name: Determine composer cache directory on Linux
if: matrix.os == 'ubuntu-latest'
name: Determine composer cache directory on Linux or MacOS
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
-
name: Set coverage args
if: matrix.os == 'ubuntu-latest' && matrix.php == '8.0'
run: echo "PHPUNIT_COVERAGE=1" >> $GITHUB_ENV
-
name: Determine composer cache directory on Windows
if: matrix.os == 'windows-latest'
run: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
-
name: Set coverage args
if: matrix.os == 'ubuntu-latest' && matrix.php == '8.0'
run: echo "PHPUNIT_COVERAGE=1" >> $GITHUB_ENV
-
name: Cache composer dependencies
uses: actions/cache@v2

View File

@ -26,8 +26,6 @@ abstract class ZipTestCase extends TestCase
/**
* Before test.
*
* @noinspection PhpMissingParentCallCommonInspection
*/
protected function setUp(): void
{
@ -48,11 +46,11 @@ abstract class ZipTestCase extends TestCase
{
parent::tearDown();
if ($this->outputFilename !== null && file_exists($this->outputFilename)) {
if (file_exists($this->outputFilename)) {
unlink($this->outputFilename);
}
if ($this->outputDirname !== null && is_dir($this->outputDirname)) {
if (is_dir($this->outputDirname)) {
FilesUtil::removeDir($this->outputDirname);
}
}