Skip to content
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
61 changes: 0 additions & 61 deletions .circleci/config.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: unit-test.yml
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
unit-test:
strategy:
matrix:
os: [ 'ubuntu-latest' ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
rabbit: [ '3.10', '3.11', '3.12', '3.13', '4.0', '4.1', '4.2' ]

runs-on: ${{matrix.os}}
services:
rabbit:
image: rabbitmq:${{matrix.rabbit}}-management
ports:
- 5672:5672
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.php}}
coverage: xdebug
tools: composer, phpunit
- run: composer install -n --prefer-dist
- run: php vendor/phpunit/phpunit/phpunit -c phpunit.xml --coverage-clover=coverage.xml
- run: php vendor/bin/coverage-check coverage.xml 10
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
"google/cloud-pubsub": "Enables using queues in Google Cloud PubSub"
},
"require-dev": {
"phpunit/phpunit": "~4.8.0",
"php-amqplib/php-amqplib": "~2.12.1",
"phpunit/phpunit": "~9.0",
"rregeer/phpunit-coverage-check": "^0.3.1",
"php-amqplib/php-amqplib": "~3.7.3",
"google/cloud-pubsub": "~1.3.0"
},
"autoload": {
Expand Down
9 changes: 2 additions & 7 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,15 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
stopOnFailure="false">
<testsuites>
<testsuite>
<testsuite name="tests">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src</directory>
</whitelist>
<blacklist>
<directory suffix=".php">vendor</directory>
<directory suffix=".php">tests</directory>
</blacklist>
</filter>
</phpunit>
3 changes: 2 additions & 1 deletion tests/Provider/AmqpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
use Packaged\Config\ConfigSectionInterface;
use Packaged\Config\Provider\ConfigSection;
use Packaged\Queue\Tests\Provider\Mock\AmqpMockProvider;
use PHPUnit\Framework\TestCase;

class AmqpTest extends \PHPUnit_Framework_TestCase
class AmqpTest extends TestCase
{
protected function _getProvider(string $queue, ?string $exchange = null)
{
Expand Down