Check if collaborator classname was imported via a use statement. #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Transunit | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
symfony-tests: | |
runs-on: ubuntu-latest | |
steps: | |
# To automatically get bug fixes and new Php versions for shivammathur/setup-php, | |
# change this to (see https://github.com/shivammathur/setup-php#bookmark-versioning): | |
# uses: shivammathur/setup-php@v2 | |
- uses: shivammathur/setup-php@2cb9b829437ee246e9b3cac53555a39208ca6d28 | |
with: | |
php-version: '8.3' | |
- uses: actions/checkout@v3 | |
- name: Copy .env.test.local | |
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');" | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install Dependencies | |
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
# - name: Execute canon unit tests via PhpSpec | |
# run: ./vendor/bin/phpspec run --format=pretty --verbose --no-interaction | |
# - name: Dogfooding via converting unit tests from PhpSpec to PHPUnit | |
# run: | | |
# php transunit.php spec | |
# | |
# - name: Execute converted unit tests via PHPUnit | |
# run: bin/phpunit --testdox | |
- name: 'Candidate conversion: sylius/addressing' | |
run: php transunit.php vendor/sylius/sylius/src/Sylius/Component/Addressing/spec var/sylius/addressing && ./vendor/bin/phpunit var/sylius/addressing | |
- name: 'Candidate conversion: sylius/attribute' | |
run: php transunit.php vendor/sylius/sylius/src/Sylius/Component/Attribute/spec var/sylius/attribute && ./vendor/bin/phpunit var/sylius/attribute |