Skip to content
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

Remove behat #104

Merged
merged 6 commits into from
Jan 25, 2024
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
52 changes: 0 additions & 52 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,58 +248,6 @@ jobs:
- name: "Validate Doctrine mapping"
run: "(cd tests/Application && bin/console doctrine:schema:validate -vvv)"

- name: "Get yarn cache directory"
id: "yarncache"
run: "echo \"::set-output name=dir::$(yarn cache dir)\""

- name: "Cache yarn dependencies"
uses: "actions/cache@v2"
with:
path: "${{ steps.yarncache.outputs.dir }}"
key: "${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}"
restore-keys: "${{ runner.os }}-node-"

- name: "Install Yarn dependencies"
run: "(cd tests/Application && yarn install)"

- name: "Build Yarn assets"
run: "(cd tests/Application && yarn build)"

- name: "Output PHP version"
run: "php -v | head -n 1 | awk '{print $2}' > .php-version"

- name: "Install certificates"
run: "symfony server:ca:install"

- name: "Run Chrome headless"
run: "google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &"

- name: "Wait for Chrome to start"
run: |
until curl -s http://127.0.0.1:9222/json/version | grep "Browser" > /dev/null 2>&1
do
sleep 1
done

- name: "Start webserver"
run: "(cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)"

- name: "Wait for webserver to start"
run: |
until symfony server:list | grep /public > /dev/null 2>&1
do
sleep 1
done

- name: "Run behat"
run: "vendor/bin/behat --strict -vvv --no-interaction || vendor/bin/behat --strict -vvv --no-interaction --rerun"

- uses: "actions/upload-artifact@v2"
if: "failure()"
with:
name: "logs"
path: "etc/build"

code-coverage:
name: "Code Coverage (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }})"

Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
/node_modules/
/composer.lock

/etc/build/*
!/etc/build/.gitignore

/tests/Application/yarn.lock

/.phpunit.result.cache
Expand Down
49 changes: 0 additions & 49 deletions behat.yml.dist

This file was deleted.

53 changes: 2 additions & 51 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"psalm/plugin-phpunit": "^0.18",
"psalm/plugin-symfony": "^5.1",
"setono/code-quality-pack": "^2.6",
"setono/sylius-behat-pack": "^0.2",
"sylius/sylius": "~1.12.13",
"symfony/browser-kit": "^5.4 || ^6.0",
"symfony/debug-bundle": "^5.4 || ^6.0",
"symfony/dotenv": "^5.4 || ^6.0",
"symfony/intl": "^5.4 || ^6.0",
Expand Down Expand Up @@ -98,58 +98,9 @@
"sort-packages": true
},
"scripts": {
"all": [
"@checks",
"@tests"
],
"analyse": "psalm",
"assets": [
"@ensure-assets-installed",
"@ensure-assets-compiled"
],
"behat": [
"SYMFONY_ENV=test composer ensure-database-ready",
"SYMFONY_ENV=test composer ensure-env-copied",
"vendor/bin/behat --tags=\"~@javascript\" --no-interaction --format=progress"
],
"check-style": "ecs check",
"checks": [
"composer validate --strict",
"composer normalize --dry-run",
"@check-style",
"@analyse"
],
"ensure-assets-compiled": "[[ -d tests/Application/public/assets ]] || (cd tests/Application && yarn build && composer ensure-env-copied && bin/console assets:install public -e ${SYMFONY_ENV:-'dev'})",
"ensure-assets-installed": "[[ -d tests/Application/node_modules ]] || (cd tests/Application && yarn install)",
"ensure-database-created": "composer ensure-env-copied && (cd tests/Application && bin/console doctrine:database:create --if-not-exists -e ${SYMFONY_ENV:-'dev'})",
"ensure-database-ready": [
"@ensure-database-created",
"@ensure-schema-updated"
],
"ensure-env-copied": "([[ ${SYMFONY_ENV:-'dev'} == 'dev' ]] && composer ensure-env-dev-copied) || ([[ ${SYMFONY_ENV:-'dev'} == 'test' ]] && composer ensure-env-test-copied) || echo 'Unknown environment ${SYMFONY_ENV}'",
"ensure-env-dev-copied": "(cd tests/Application && ([[ -f .env.dev.local ]] || cp .env .env.dev.local))",
"ensure-env-test-copied": "(cd tests/Application && ([[ -f .env.test.local ]] || cp .env.test .env.test.local))",
"ensure-schema-updated": "composer ensure-env-copied && (cd tests/Application && bin/console doctrine:schema:update --force -e ${SYMFONY_ENV:-'dev'})",
"ensure-vendors-installed": "[[ -f vendor/autoload.php ]] || php -d memory_limit=-1 /usr/local/bin/composer install",
"fix-style": "ecs check --fix",
"fixtures": [
"@ensure-database-ready",
"(cd tests/Application && bin/console sylius:fixtures:load --no-interaction -e ${SYMFONY_ENV:-'dev'})"
],
"phpunit": "vendor/bin/phpunit",
"run": [
"@ensure-env-copied",
"(cd tests/Application && bin/console server:run -d public -e ${SYMFONY_ENV:-'dev'})"
],
"tests": [
"@phpunit",
"@behat"
],
"try": [
"@ensure-vendors-installed",
"@assets",
"@fixtures",
"@run"
]
"phpunit": "phpunit"
}
}
Empty file removed etc/build/.gitignore
Empty file.
24 changes: 0 additions & 24 deletions features/admin/adding_product_callout.feature

This file was deleted.

51 changes: 0 additions & 51 deletions features/shop/displaying_product_callouts.feature

This file was deleted.

1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<directory name="tests"/>
<ignoreFiles>
<directory name="tests/Application"/>
<directory name="tests/Behat"/>
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>
Expand Down
2 changes: 0 additions & 2 deletions tests/Application/config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
Sylius\Bundle\ShopBundle\SyliusShopBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true, 'test_cached' => true],
Sylius\Behat\Application\SyliusTestPlugin\SyliusTestPlugin::class => ['test' => true, 'test_cached' => true],
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true],
Expand Down
3 changes: 0 additions & 3 deletions tests/Application/config/services_test.yaml

This file was deleted.

Loading
Loading