Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Jul 28, 2022
1 parent c9cf89f commit 023bce9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 142 deletions.
143 changes: 1 addition & 142 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,63 +25,7 @@ jobs:
fail-fast: false
matrix:
include:
- php: 7.1.8
- php: 7.1.28
- php: 7.1
- php: 7.1
setup: lowest

- php: 7.2.0
- php: 7.2.15
- php: 7.2
- php: 7.2
setup: lowest

- php: 7.3.0
- php: 7.3.5
- php: 7.3
- php: 7.3
setup: lowest

- php: 7.4
- php: 7.4
setup: lowest

- php: 8.0
classmap-authoritative: true

- php: 8.0
- php: 8.0
setup: lowest

- php: 8.1
- php: 8.1
setup: lowest

- php: 8.2
- php: 8.2
setup: lowest

- php: 8.0
laravel: true
reference: 9.x

- php: 8.0
laravel: true
reference: 9.x
classmap-authoritative: true

- php: 8.1
coverage: true

- php: 8.1
laravel: true
reference: master

- php: 8.1
laravel: true
reference: master
classmap-authoritative: true

name: ${{ matrix.laravel && 'Laravel compatibility - ' || '' }}${{ matrix.classmap-authoritative && 'classmap-authoritative - ' || '' }}${{ matrix.coverage && 'Coverage - ' || '' }}PHP ${{ matrix.php }} - ${{ matrix.setup || 'stable' }} - ubuntu

Expand Down Expand Up @@ -136,7 +80,7 @@ jobs:
php -d memory_limit=-1 -d zend.enable_gc=0 -d error_reporting=-1 vendor/phpunit/phpunit/phpunit --coverage-clover=coverage.xml --coverage-text;
fi;
if [[ "${{ matrix.laravel }}" != 'true' && "${{ matrix.coverage }}" != 'true' ]]; then
php -d memory_limit=-1 -d zend.enable_gc=0 -d error_reporting=-1 vendor/phpunit/phpunit/phpunit;
php -d memory_limit=-1 -d zend.enable_gc=0 -d error_reporting=-1 vendor/phpunit/phpunit/phpunit --group i;
fi;
if [[ "${{ matrix.laravel }}" = 'true' ]]; then
vendor/bin/multi-tester tests/Laravel/laravel-${{ matrix.reference }}.multi-tester.yml;
Expand All @@ -161,88 +105,3 @@ jobs:
- name: Coverage
uses: codecov/codecov-action@v1
if: matrix.coverage

windows:
runs-on: windows-latest

strategy:
fail-fast: false
matrix:
include:
- php: 7.1.8
- php: 7.1.28
- php: 7.1
- php: 7.1
setup: lowest

- php: 7.2.0
- php: 7.2.15
- php: 7.2
- php: 7.2
setup: lowest

- php: 7.3.0
- php: 7.3.5
- php: 7.3
- php: 7.3
setup: lowest

- php: 7.4
coverage: true
- php: 7.4
setup: lowest

- php: 8.0
- php: 8.0
setup: lowest

- php: 8.1
- php: 8.1
setup: lowest

- php: 8.2
- php: 8.2
setup: lowest

name: PHP ${{ matrix.php }} - ${{ matrix.setup || 'stable' }} - windows

steps:
- name: Checkout the code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json
tools: composer:v2
coverage: none

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php }}-{{ matrix.setup }}-windows-${{ hashFiles('**/composer.json') }}"
restore-keys: "php-${{ matrix.php }}-{{ matrix.setup }}-windows-${{ hashFiles('**/composer.json') }}"

- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: |
composer remove --no-update kylekatarnls/multi-tester phpmd/phpmd friendsofphp/php-cs-fixer --no-interaction --dev;
${{ matrix.php >= 8.1 && 'composer require --no-update phpunit/phpunit:^9.5.20 --no-interaction --dev;' || '' }}
composer update --prefer-dist --no-progress --prefer-${{ matrix.setup || 'stable' }}${{ matrix.php >= 8.2 && ' --ignore-platform-reqs' || '' }};
- name: Run test suite
run: |
php -d memory_limit=-1 -d zend.enable_gc=0 -d error_reporting=-1 vendor/phpunit/phpunit/phpunit;
env:
PHP_VERSION: ${{ matrix.php }}
REDIS_HOST: 127.0.0.1
REDIS_PORT: 6379
3 changes: 3 additions & 0 deletions tests/CarbonImmutable/SerializationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ protected function setUp(): void
: ['O:22:"Carbon\CarbonImmutable":3:{s:4:"date";s:26:"2016-02-01 13:20:25.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:15:"America/Toronto";}'];
}

/** @group i */
public function testSerialize()
{
$dt = Carbon::create(2016, 2, 1, 13, 20, 25);
var_dump($this->serialized, serialize($dt));
exit;
$this->assertContains($dt->serialize(), $this->serialized);
$this->assertContains(serialize($dt), $this->serialized);
}
Expand Down

0 comments on commit 023bce9

Please sign in to comment.