-
-
Notifications
You must be signed in to change notification settings - Fork 111
feat: Behat extension #1085
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
Open
nikophil
wants to merge
9
commits into
2.x
Choose a base branch
from
behat-extension
base: 2.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: Behat extension #1085
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9117700
feat/behat context (#1083)
nikophil ee44b24
bot: fix cs [skip ci]
nikophil 2e8c013
chore: `zenstruck/foundry-behat` a subpackage (#1084)
nikophil 6d1f069
refactor: extract table normalization into private methods in Foundry…
nikophil 92efd04
perf: optimize class-to-factory lookups with index map in FactoryShor…
nikophil 9a0d889
fix: improve error messages in AbstractFoundryContext
nikophil c61be69
fix: allow quoted object names starting with digits in regex patterns
nikophil 6ee606c
feat: support UUID-based entity ids in ObjectRegistry
nikophil 9c1b400
docs: clarify ref(type, name) syntax as an escape hatch
nikophil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| name: Behat | ||
|
|
||
| on: | ||
| push: | ||
| paths: &paths | ||
| - .github/workflows/behat.yml | ||
| - src/Test/Behat/** | ||
| pull_request: | ||
| paths: *paths | ||
| schedule: | ||
| - cron: '0 0 1,16 * *' | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
| working-directory: ./src/Test/Behat | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| behat: | ||
| name: Behat - P:${{ matrix.php }}, S:${{ matrix.symfony }}${{ matrix.deps == 'lowest' && ' (lowest)' || '' }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| php: [ 8.3, 8.5 ] | ||
| symfony: [ 6.4.*, 7.4.* ] | ||
| deps: [ highest, lowest ] | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php }} | ||
| coverage: none | ||
| tools: flex | ||
|
|
||
| - name: Add the polyfill compatible with Doctrine ^2.16 | ||
| if: ${{ matrix.deps == 'lowest' }} | ||
| run: composer require --dev symfony/polyfill-php80:^1.16 --no-update | ||
|
|
||
| - name: Install dependencies | ||
| uses: ramsey/composer-install@v2 | ||
| with: | ||
| working-directory: "src/Test/Behat" | ||
| dependency-versions: ${{ matrix.deps }} | ||
| composer-options: --prefer-dist | ||
| env: | ||
| SYMFONY_REQUIRE: ${{ matrix.symfony }} | ||
|
|
||
| - name: "Main test suite: reset DB at scenario level, with Dama support" | ||
| run: vendor/bin/behat --colors -vvv | ||
|
|
||
| - name: "Main test suite: reset DB at scenario level, without Dama support" | ||
| run: vendor/bin/behat --colors -vvv --profile=main-no-dama | ||
|
|
||
| - name: "Main test suite: reset DB at scenario level, with native Dama extension" | ||
| run: vendor/bin/behat --colors -vvv --profile=main-native-dama --tags='~@skip-with-native-dama' | ||
|
|
||
| - name: Manual reset DB | ||
| run: vendor/bin/behat --colors -vvv --profile=reset-manual | ||
|
|
||
| - name: Manual reset DB and Dama support | ||
| run: vendor/bin/behat --colors -vvv --profile=reset-manual-dama | ||
|
|
||
| - name: Reset DB at feature level | ||
| run: vendor/bin/behat --colors -vvv --profile=reset-feature | ||
|
|
||
| - name: Reset DB at feature level with Dama support | ||
| run: vendor/bin/behat --colors -vvv --profile=reset-feature-dama | ||
|
|
||
| - name: Reset DB disabled | ||
| run: vendor/bin/behat --colors -vvv --profile=reset-disabled | ||
|
|
||
| phpunit: | ||
| name: PHPUnit - P:${{ matrix.php }}, S:${{ matrix.symfony }}${{ matrix.deps == 'lowest' && ' (lowest)' || '' }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| php: [ 8.3, 8.5 ] | ||
| symfony: [ 6.4.*, 7.4.* ] | ||
| deps: [ highest, lowest ] | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php }} | ||
| coverage: none | ||
| tools: flex | ||
|
|
||
| - name: Add the polyfill compatible with Doctrine ^2.16 | ||
| if: ${{ matrix.deps == 'lowest' }} | ||
| run: composer require --dev symfony/polyfill-php80:^1.16 --no-update | ||
|
|
||
| - name: Install dependencies | ||
| uses: ramsey/composer-install@v2 | ||
| with: | ||
| working-directory: "src/Test/Behat" | ||
| dependency-versions: ${{ matrix.deps }} | ||
| composer-options: --prefer-dist | ||
| env: | ||
| SYMFONY_REQUIRE: ${{ matrix.symfony }} | ||
|
|
||
| - name: Run tests | ||
| run: vendor/bin/phpunit | ||
|
|
||
| phpstan: | ||
| name: PhpStan | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: 8.5 | ||
| coverage: none | ||
| tools: flex | ||
|
|
||
| - name: Install dependencies | ||
| uses: ramsey/composer-install@v2 | ||
| with: | ||
| working-directory: "src/Test/Behat" | ||
| composer-options: --prefer-dist | ||
| env: | ||
| SYMFONY_REQUIRE: 7.4.* | ||
|
|
||
| - name: Install PHPStan | ||
| run: composer bin phpstan install | ||
|
|
||
| - name: Run PHPStan | ||
| run: ../../../bin/tools/phpstan/vendor/phpstan/phpstan/phpstan |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.