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

Better Github Integration using Github Actions #528

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
| Q | A
| ------------- | ---
| Branch? | master / x.y.z
| Bug fix? | yes/no
| New feature? | yes/no <!-- don't forget updating docs/CHANGELOG.md files -->
| BC breaks? | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->

<!--
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->
Comment on lines +1 to +12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're aiming to unify it accross all the repositories. The latest version I've come up with is here, but still requires some debate probably, since I've pushed this during the 3.0 release rush.

14 changes: 14 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
| Q | A
| ---------------- | -----
| Bug report? | yes/no
| Feature request? | yes/no
| BC Break report? | yes/no
| RFC? | yes/no
| Version | x.y.z
| Environment | Linux/Mac/Windows


<!--
- Please fill in this template according to your issue.
- And replace this comment by the description of your issue.
-->
Comment on lines +1 to +14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not relevant for us, we don't support Issues (see that the tab is missing). All the issues should be reported in JIRA.

143 changes: 143 additions & 0 deletions .github/workflows/main-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: CI

on: [push, pull_request]

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:10.3
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: ezplatform
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:latest
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
matrix:
php: [7.3]
env:
CACHE_POOL: cache.redis
DATABASE_URL: mysql://[email protected]:3306/ezplatform
CACHE_DSN: 127.0.0.1:6379
APP_ENV: behat
APP_DEBUG: 1
COMPOSER_MEMORY_LIMIT: 4G
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl
id: php

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction

- name: Show Versions
run: composer info -i

- name: Install Symfony Server
run: |
wget https://get.symfony.com/cli/installer -O - | bash
/home/runner/.symfony/bin/symfony local:server:ca:install
/home/runner/.symfony/bin/symfony local:php:list

- name: Install eZ Platform
run: |
rm -rf var/cache
composer ezplatform-install

- name: Run Webserver
run: /home/runner/.symfony/bin/symfony local:server:start --port=42443 -d

- name: Change Mink Base Url
run: |
sed -E 's/(base_url): '\''(http:\/\/localhost)'\''/\1: https:\/\/127.0.0.1:42443/g' behat.yml.dist > behat.yml

- name: "eZ Platform REST Bundle functional tests"
run: |
bin/console ez:behat:create-language 'pol-PL' 'Polish (polski)'
./bin/.travis/run_rest_tests.sh
env:
EZP_TEST_REST_HOST: 127.0.0.1:42443
EZP_TEST_REST_SCHEME: https

- name: "Kernel core tests"
run: bin/ezbehat --mode=behat --profile=core --tags=~@broken

- name: "Behat"
run: bin/ezbehat --mode=behat --profile=behat --tags=~@broken

- name: "Content Forms tests on Clean Platform"
run: bin/ezbehat --mode=behat --profile=content-forms --tags=~@broken --non-strict

- name: "Admin UI on Clean Platform"
run: bin/ezbehat --profile=adminui --suite=adminui

- name: "Admin UI tests using different personas"
run: |
bin/ezbehat --profile=setup --suite=personas --tags=@setup
bin/ezbehat --profile=adminui --suite=personas

varnishthroughezlaunchpad:
name: eZ Launchpad and HTTP Cache Tests
runs-on: ubuntu-latest
strategy:
matrix:
# This is PHP to run eZ Launchpad here, not the PHP running eZ
php: [7.3]
steps:
- uses: actions/checkout@v1

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
id: php

- name: Create fake conditions for eZ Launchpad - Create
run: |
echo "{provisioning: { folder_name: provisioning}, docker: { compose_filename: docker-compose.yml, network_name: githubactions, network_prefix_port: 42}}" > ../.ezlaunchpad.yml
mkdir ../data && cd ../data
touch db.sql && gzip db.sql
mkdir ezlaunchpad && cd ezlaunchpad
wget -O ezlaunchpad.zip https://github.com/ezsystems/launchpad/archive/master.zip
unzip ezlaunchpad.zip && rm ezlaunchpad.zip
cp -rp launchpad-master/payload ../../provisioning
cd .. && rm -rf ezlaunchpad

- name: eZ Launchpad installation
run: curl -LSs https://ezsystems.github.io/launchpad/install_curl.bash | bash

- name: eZ Launchpad create the project
run: cd .. && ~/ez create

- name: Status Info
run: cd .. && ~/ez ps

- name: "Admin UI on Clean Platform with Varnish and Redis"
run: echo "@todo"
2 changes: 1 addition & 1 deletion bin/.travis/run_rest_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Install REST package to get its dev dependencies and use them to run tests

cd ./vendor/ezsystems/ezplatform-rest
composer install
composer install --prefer-dist --no-progress --no-suggest --no-interaction
php ./vendor/bin/phpunit -c phpunit-integration-rest.xml