diff --git a/.github/workflows/browser-tests.yaml b/.github/workflows/browser-tests.yaml new file mode 100644 index 00000000..b03ca86e --- /dev/null +++ b/.github/workflows/browser-tests.yaml @@ -0,0 +1,16 @@ +name: Browser tests + +on: + push: + branches: + - "[0-9]+.[0-9]+" + pull_request: ~ + +jobs: + rest: + name: "Functional REST tests" + uses: ezsystems/ezplatform/.github/workflows/callable-browser-tests.yaml@2.5 + with: + test-suite: "--profile=rest --tags=~@broken --suite=fullJson --non-strict" + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7eaea89a..70866d80 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,3 +47,35 @@ jobs: - name: Run test suite run: composer run-script --timeout=600 test + + functional: + name: REST tests + runs-on: "ubuntu-20.04" + timeout-minutes: 10 + env: + COMPOSE_FILE: "doc/docker/base-dev.yml:doc/docker/selenium.yml" + SYMFONY_ENV: "behat" + PHP_IMAGE: "ezsystems/php:7.2-v1" + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP Action + uses: shivammathur/setup-php@v2 + with: + php-version: 7.1 + coverage: none + extensions: pdo_sqlite, gd + tools: cs2pr + + - name: Setup the project + run: ./tests/.travis/prepare_for_functional_tests.sh + + - name: Run setup Command + run: | + cd "$HOME/build/ezplatform" + docker-compose --env-file=.env exec -T --user www-data app sh -c "bin/console ez:behat:create-language 'pol-PL' 'Polish (polski)'" + + - name: Run tests + run: | + cd "$HOME/build/ezplatform" + docker-compose --env-file=.env exec -T --user www-data app sh -c "bin/phpunit -v vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishRestBundle/Tests/Functional" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bccf728a..00000000 --- a/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ -dist: xenial -sudo: required - -language: php - -cache: - directories: - - $HOME/.composer/cache/files - - -env: - global: - # For functional tests - - COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/selenium.yml" - - SYMFONY_ENV=behat - -matrix: - fast_finish: true - include: - # Functional - - php: 7.1 - env: TEST_CMD="bin/behat --profile=rest --tags=~@broken --suite=fullJson" PHP_IMAGE=ezsystems/php:7.1-v1 - - php: 7.2 - env: TEST_CMD="bin/phpunit -v vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishRestBundle/Tests/Functional" SYMFONY_CMD="ez:behat:create-language 'pol-PL' 'Polish (polski)'" PHP_IMAGE=ezsystems/php:7.2-v1 - -# test only master + stable (+ Pull requests) -branches: - only: - - master - - /^\d.\d+$/ - -before_script: - - travis_retry composer selfupdate - - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - - ./tests/.travis/prepare_for_functional_tests.sh - # Execute Symfony command if injected into test matrix - - if [ "${SYMFONY_CMD}" != "" ] ; then cd "$HOME/build/ezplatform"; docker-compose exec --user www-data app sh -c "bin/console ${SYMFONY_CMD}" ; fi - -script: - - cd "$HOME/build/ezplatform"; docker-compose exec --user www-data app sh -c "$TEST_CMD" - -notifications: - slack: - rooms: - - secure: eO5PnOM9RS8oKQQQo9hlkcxD1whvJThmjWLJzQHN1BDmdqfJ660bBzgQw7d8pKCBVX8rGnSj7AzIYO0XK7T9gRX8YM4cmER4iCR+gl6jiVoI8fu5VhMcW3db4YVLnrDv38v7ZPSdY+T57DXLy45eoqz4D7+03rBqJzvvyVCVoEXzjqbsMQyHbw2UC7eyAChP9G0EVEiWY/D+bEC25KzEhDExXn3aTyIeynmqm5MhAGOM53+xPWf110PqhPcRS/Oeg2LWS0z6+4QyQMc1JgWQ86/ljzG88pjfG3ypIRcgy4tNFBZea2MQ/UnBxlrbeQyYiP1nkVmsuIaVTRLePHwsadCP+XJKe9BN64y8NCgfmG2zOX8e83TVAXsPO4F9iA2xMq7cZ0Qykf1sAj19DeGdEscF3eblQaDWqjfAthxCXNPbQOqH8wGmNGgj296wIBrT2M7W5dbIV2a1bI1PmETTJg82XqksR+Y90GV3vf2Mu+mX5/dRrawmOodMfLO1ZqUlvLZEvdJ0zgDH0enzIFC94+Y1srmtyzRlUVIhTKnAC+AjXkHR8L7uAPJvAmNLtPbzhkJyYBmriQZtM2BOpPp1uIR5nFxvkaVcyks1mNIRIfLVFHrquTL0KenQha6iAS/4kLt7csuLhJuXg+dXwmel6+X6x8AjDcCqbqAwqv9auTo= - on_success: change - on_failure: always - on_pull_requests: false