Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Code Coverage #21

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service_name: symplicity-outlook
22 changes: 21 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ on:
workflow_dispatch:

push:
branches:
- master
paths-ignore:
- '*.md'
- '.github/**'
- 'example/**'

pull_request:
branches:
- master
paths-ignore:
- '*.md'
- '.github/**'
Expand Down Expand Up @@ -49,5 +53,21 @@ jobs:
run: vendor/bin/phpstan

- name: Tests
run: vendor/bin/phpunit --coverage-clover clover.xml
run: |
mkdir -p ./build/logs
vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml

- name: Verify coverage file is created
run: |
if [ ! -f ./build/logs/clover.xml ]; then
echo "clover.xml file was not created"
exit 1
fi

- name: Upload coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=./build/logs/clover.xml -v

3 changes: 3 additions & 0 deletions src/Notification/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ public function renew(string $subscriptionId, \DateTime $expiration, array $args
}
}

/**
* @param array<string, mixed> $args
*/
public function delete(string $subscriptionId, array $args = []): void
{
try {
Expand Down