Skip to content

Commit

Permalink
Fixing issues with CI test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
jamielsharief committed Jan 4, 2021
1 parent a9f164b commit 042435c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ jobs:
composer update --no-progress --prefer-dist
- name: Run PHPUnit
run: "php vendor/bin/phpunit --coverage-clover=clover.xml"
env:
EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }}
EMAIL_HOST: ${{ secrets.EMAIL_HOST }}
EMAIL_USERNAME: ${{ secrets.EMAIL_USERNAME }}
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}
EMAIL_PORT: ${{ secrets.EMAIL_PORT }}
EMAIL_SSL: ${{ secrets.EMAIL_SSL }}
EMAIL_TLS: ${{ secrets.EMAIL_TLS }}
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<php>
<const name="PHPUNIT" value="true"/>
<env name="ORIGIN_ENV" value="test"/>
<!-- This is commented out if not CI fails
<env name="EMAIL_ADDRESS" value="user@example.com"/>
<env name="EMAIL_HOST" value="smtp.example.com"/>
<env name="EMAIL_USERNAME" value="user@example.com"/>
Expand All @@ -22,5 +23,6 @@
<env name="EMAIL_TLS" value="0"/>
<env name="GSUITE_USERNAME" value="user@gmail.com"/>
<env name="GSUITE_TOKEN" value="123g456789abcdef"/>
-->
</php>
</phpunit>
2 changes: 1 addition & 1 deletion tests/EmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ public function testSmtpSend()


$result = $email->send();
print_r($email->smtpLog());

$this->assertNotEmpty($result);
sleep(1); // small delay before next email is sent
return implode("'\n", $email->smtpLog());
Expand Down
2 changes: 1 addition & 1 deletion tests/Oauth2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Oauth2Test extends \PHPUnit\Framework\TestCase
{
public function testGmail()
{
if (! $this->env('GSUITE_TOKEN') or ! $this->env('GSUITE_USERNAME')) {
if (! $this->env('GSUITE_TOKEN') || ! $this->env('GSUITE_USERNAME')) {
$this->markTestSkipped('No credentials');
}
Email::config('test-gmail', [
Expand Down

0 comments on commit 042435c

Please sign in to comment.