This repository has been archived by the owner on Oct 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CI and add Testing for other PHP versions (#116)
* Remove TravisCI & replace with Github Actions * keep travis-ci add other workflows * switch order of guzzle dependency * use matrix with highest/lowest composer version deps * add php deps * try fixing pagenotfound test * raise guzzle min to 6.3 to try fixing 7.1 build * use stages since these tests are account and integration based * add simple guid generation to test * bump version * bump version to 3.7.0
- Loading branch information
Showing
8 changed files
with
61 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
language: php | ||
php: | ||
- 7.1 | ||
before_install: | ||
- cp phpunit.xml.sample phpunit.xml | ||
- composer install | ||
script: | ||
- ./vendor/bin/phpunit | ||
jobs: | ||
include: | ||
- stage: php71-lowest | ||
php: 7.1 | ||
env: dependencies=lowest | ||
script: ./vendor/bin/phpunit | ||
- stage: php72-lowest | ||
php: 7.2 | ||
env: dependencies=lowest | ||
script: ./vendor/bin/phpunit | ||
- stage: php72 | ||
php: 7.2 | ||
script: ./vendor/bin/phpunit | ||
- stage: php73 | ||
php: 7.3 | ||
script: ./vendor/bin/phpunit | ||
- stage: php74 | ||
php: 7.4 | ||
script: ./vendor/bin/phpunit | ||
|
||
before_script: | ||
- composer self-update -q | ||
- if [ -z "$dependencies" ]; then composer install; fi; | ||
- if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest -n; fi; | ||
- if [ "$dependencies" = "highest" ]; then composer update -n; fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace HelloSign\Test; | ||
|
||
class TestUtils | ||
{ | ||
/** | ||
* @param int|null $length | ||
* @return string | ||
*/ | ||
public static function generateGuid(?int $length = 40): string | ||
{ | ||
$bytes = random_bytes((int) ceil($length / 2)); | ||
$guid = bin2hex($bytes); | ||
|
||
return substr($guid, 0, $length); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters