Skip to content

Commit

Permalink
Merge pull request #1 from peter279k/add_github_action
Browse files Browse the repository at this point in the history
Add GitHub action to make CI tests
  • Loading branch information
Athlon1600 authored Oct 8, 2023
2 parents 14252ab + 09061c1 commit 4d286b1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: build

on: [push, pull_request]

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, zip, xml
coverage: none

- name: Install dependencies
uses: ramsey/composer-install@v2

- name: Run test suite
run: vendor/bin/phpunit tests/
4 changes: 2 additions & 2 deletions tests/DownloadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class DownloadTest extends TestCase
/** @var CurlDownloader */
protected $client;

protected function setUp()
protected function setUp(): void
{
$this->client = new CurlDownloader(new Client());
}
Expand Down Expand Up @@ -80,4 +80,4 @@ public function test_download_file_no_extension()
$this->assertTrue(file_exists('./content_type_text_html.html'));
@unlink('./content_type_text_html.html');
}
}
}

0 comments on commit 4d286b1

Please sign in to comment.