Skip to content

Commit

Permalink
Add minimal phpunit run in GitHub Actions (#44)
Browse files Browse the repository at this point in the history
* Run phpunit in GitHub Actions
* Use CI rather TRAVIS env variable to test for CI
* Remove php 8.0 from GitHub Actions pipeline for now
  • Loading branch information
glensc authored Jan 12, 2021
1 parent aaf8c86 commit 32e7a6a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- "7.2"
- "7.3"
- "7.4"
- "8.0"

steps:
- name: Checkout Code
Expand Down Expand Up @@ -51,4 +50,7 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run PHPUnit tests
run: vendor/bin/phpunit --verbose

# vim:ft=yaml:et:ts=2:sw=2
2 changes: 1 addition & 1 deletion tests/Zend/Cache/CommonBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public function testGetWithAnExpiredCacheId()
public function testCleanModeAll()
{
if ($this instanceof Zend_Cache_MemcachedBackendTest
&& getenv('TRAVIS')
&& getenv('CI')
) {
$this->markTestSkipped(
'Test randomly fail on Travis CI.'
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Cache/FileBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function testCleanModeAllWithHashedDirectoryStructure()

public function testSaveWithABadCacheDir()
{
if (getenv('TRAVIS')) {
if (getenv('CI')) {
$this->markTestSkipped(
'Test randomly fail on Travis CI.'
);
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Ldap/ConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function toLdapSerializeProvider(){
);
}

if (getenv('TRAVIS') && version_compare(PHP_VERSION, '5.4.0', '>=')) {
if (getenv('CI') && version_compare(PHP_VERSION, '5.4.0', '>=')) {
return array(
array('N;', null),
array('i:1;', 1),
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Session/SessionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ public function testUnsetAllNamespace()
*/
public function testSetExpirationSeconds()
{
if (getenv('TRAVIS')) {
if (getenv('CI')) {
$this->markTestSkipped(
'Test randomly fail on Travis CI.'
);
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Soap/AllTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function suite()

//early exit because of segfault in this specific version
//https://github.com/zendframework/zf1/issues/650
if (getenv('TRAVIS') && version_compare(PHP_VERSION, '5.4.37', '=')) {
if (getenv('CI') && version_compare(PHP_VERSION, '5.4.37', '=')) {
return $suite;
}

Expand Down

0 comments on commit 32e7a6a

Please sign in to comment.