Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio-ivona committed Feb 27, 2022
1 parent a462c0b commit 767ffaa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ jobs:
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Set sandbox token
run: |
sed -e 's/:fake_bot_token:/${{secrets.SANDOBOX_TELEGRAM_BOT_TOKEN}}/' -i "./phpunit.xml.dist"
- name: test
run: cat ./phpunit.xml.dist

- name: Execute tests
run: SANDOBOX_TELEGRAM_BOT_TOKEN=${{secrets.SANDOBOX_TELEGRAM_BOT_TOKEN}} && vendor/bin/pest --ci
run: vendor/bin/pest --ci

2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<junit outputFile="build/report.junit.xml"/>
</logging>
<php>
<server name="SANDOBOX_TELEGRAM_BOT_TOKEN" value=""/>
<server name="SANDOBOX_TELEGRAM_BOT_TOKEN" value=":fake_bot_token:"/>
<server name="SANDBOX_TELEGRAM_CHAT_ID" value=""/>
</php>
</phpunit>
2 changes: 1 addition & 1 deletion tests/Unit/Concerns/HasBotsAndChatsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
$bot = bot(env('SANDOBOX_TELEGRAM_BOT_TOKEN'));

assertMatchesSnapshot($bot->info());
})->skip(fn () => empty(env('SANDOBOX_TELEGRAM_BOT_TOKEN')), 'Sandbox telegram bot token missing');
})->skip(fn () => env('SANDOBOX_TELEGRAM_BOT_TOKEN') === ':fake_bot_token:', 'Sandbox telegram bot token missing');

0 comments on commit 767ffaa

Please sign in to comment.