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
99 changes: 0 additions & 99 deletions .github/coding_standard.yaml

This file was deleted.

19 changes: 7 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
matrix:
php: [ "8.2", "8.3" ]
symfony: [ "^7.1" ]
sylius: [ "~2.0.0" ]
sylius: [ "^2.0" ]
node: [ "20.x" ]
mysql: ["8.0"]

Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:

-
name: Cache Yarn
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
Expand Down Expand Up @@ -150,17 +150,12 @@ jobs:
run: (cd tests/Application && bin/console doctrine:schema:validate)

-
name: Run ECS
run: vendor/bin/ecs check src

-
name: Run PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon -l 7 src/
name: Run PHPUnit
run: vendor/bin/phpunit --colors=always

-
name: Run PHPSpec
run: vendor/bin/phpspec run --ansi -f progress --no-interaction

name: Create behat logs directory
run: (mkdir -p etc/build && chmod a+rw etc/build )

-
name: Run Behat
Expand All @@ -172,7 +167,7 @@ jobs:

-
name: Upload Behat logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: Behat logs
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/coding_standard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Coding standard

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request: ~
release:
types: [created]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~

jobs:
tests:
runs-on: ubuntu-latest

name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}"

strategy:
fail-fast: false
matrix:
php: [ "8.2", "8.3" ]
symfony: [ "^7.1" ]
sylius: [ "^2.0" ]
node: [ "20.x" ]

steps:
- uses: actions/checkout@v3

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

- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json', '**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-composer-

- name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10"
composer config extra.symfony.require "${{ matrix.symfony }}"

- name: Restrict Sylius version
if: matrix.sylius != ''
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction

- name: Install PHP dependencies
run: composer install --no-interaction
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}

- name: Run PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon -l 8 src/

- name: Run ECS
run: vendor/bin/ecs check src

- name: Failed build Slack notification
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') }}
env:
SLACK_CHANNEL: ${{ secrets.FAILED_BUILD_SLACK_CHANNEL }}
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_MESSAGE: ':x:'
SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository
SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}
24 changes: 2 additions & 22 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,14 @@ default:
files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/"
base_url: "https://127.0.0.1:8080/"
default_session: symfony
javascript_session: chrome_headless
javascript_session: chrome
sessions:
symfony:
symfony: ~
chrome_headless:
chrome:
chrome:
api_url: http://127.0.0.1:9222
validate_certificate: false
chrome:
selenium2:
browser: chrome
capabilities:
browserName: chrome
browser: chrome
version: ""
marionette: null # https://github.com/Behat/MinkExtension/pull/311
chrome:
switches:
- "start-fullscreen"
- "start-maximized"
- "no-sandbox"
extra_capabilities:
unexpectedAlertBehaviour: accept
goog:chromeOptions:
w3c: false
firefox:
selenium2:
browser: firefox
show_auto: false

FriendsOfBehat\SymfonyExtension:
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
},
"require-dev": {
"behat/behat": "^3.14",
"behat/mink-selenium2-driver": "1.6",
"bitbag/coding-standard": "^3.0.0",
"dmore/behat-chrome-extension": "^1.4",
"dmore/chrome-mink-driver": "^2.9",
"friends-of-behat/mink": "^1.11",
"friends-of-behat/mink-browserkit-driver": "^1.6",
"friends-of-behat/mink-debug-extension": "^2.1",
Expand All @@ -38,7 +38,6 @@
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
"nelmio/alice": "^3.10",
"nyholm/psr7": "^1.8",
"phpspec/phpspec": "^7.0",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"robertfausk/behat-panther-extension": "^1.1",
Expand Down
5 changes: 0 additions & 5 deletions phpspec.yml

This file was deleted.

Loading