Skip to content
Open
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
27 changes: 24 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: "tests"
on:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
push:
branches:
- master
env:
extensions: "json, xdebug"
cache-version: "1"
Expand All @@ -24,8 +27,8 @@ jobs:
- name: Checkout PR head (fork code)
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
persist-credentials: false

Expand Down Expand Up @@ -94,8 +97,26 @@ jobs:
run: "composer dump-autoload --optimize"

- name: Run Codeception Tests
env:
XDEBUG_MODE: coverage
run: |
vendor/bin/codecept run -v
vendor/bin/codecept run -v --coverage --coverage-xml coverage.xml --coverage-html

- name: Upload coverage report
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: |
tests/_output/coverage.xml
tests/_output/coverage/

- name: "Upload coverage to Coveralls"
if: ${{ success() }}
uses: coverallsapp/github-action@v2
with:
file: tests/_output/coverage.xml
format: clover

- name: IP check on Failure
if: ${{ failure() }}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<p align=center>
<a href="https://github.com/comgate-payments/sdk-php/actions"><img src="https://badgen.net/github/checks/comgate-payments/sdk-php"></a>
<a href="https://coveralls.io/github/comgate-payments/sdk-php?branch=master"><img src="https://coveralls.io/repos/github/comgate-payments/sdk-php/badge.svg?branch=master"></a>
<a href="https://packagist.org/packages/comgate/sdk"><img src="https://badgen.net/packagist/dm/comgate/sdk"></a>
<a href="https://packagist.org/packages/comgate/sdk"><img src="https://badgen.net/packagist/v/comgate/sdk"></a>
<a href="https://packagist.org/packages/comgate/sdk"><img src="https://badgen.net/packagist/php/comgate/sdk"></a>
Expand Down
Loading