Skip to content

Bump Version

Bump Version #1659

name: Test application
on:
pull_request:
push:
branches:
- '[0-9]+.x'
- '[0-9]+.[0-9]+'
schedule:
- cron: "0 0 * * *"
jobs:
test:
name: "PHP ${{ matrix.php-version }} and Node.js ${{ matrix.node-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: '7.2'
node-version: '12'
mysql-version: '5.7'
create-project: true
create-database: true
checkout-directory: 'project'
working-directory: 'create-project-test'
php-extensions: 'ctype, iconv, mysql, gd'
tools: 'composer:v2'
env: {}
- php-version: '7.4'
node-version: '12'
mysql-version: '8.0'
create-project: false
create-database: false
checkout-directory: 'project'
working-directory: 'project'
php-extensions: 'ctype, iconv, mysql, imagick'
tools: 'composer:v2'
env:
APP_ENV: test
APP_SECRET: a448d1dfcaa563fce56c2fd9981f662b
MAILER_URL: null://localhost
SULU_ADMIN_EMAIL:
DATABASE_URL: "mysql://root:@127.0.0.1:3306/sulu_test?serverVersion=8.0"
- php-version: '8.0'
node-version: '14'
mysql-version: '5.7'
create-project: false
create-database: false
checkout-directory: 'project'
working-directory: 'project'
php-extensions: 'ctype, iconv, mysql, gd'
tools: 'composer:v2'
env:
APP_ENV: test
APP_SECRET: a448d1dfcaa563fce56c2fd9981f662b
MAILER_URL: null://localhost
SULU_ADMIN_EMAIL:
DATABASE_URL: "mysql://root:@127.0.0.1:3306/sulu_test?serverVersion=5.7"
- php-version: '8.1'
node-version: '14'
mysql-version: '8.0'
create-project: true
create-database: true
checkout-directory: 'project'
working-directory: 'create-project-test'
php-extensions: 'ctype, iconv, mysql, gd'
tools: 'composer:v2'
env:
APP_ENV: test
APP_SECRET: a448d1dfcaa563fce56c2fd9981f662b
MAILER_URL: null://localhost
SULU_ADMIN_EMAIL:
DATABASE_URL: "mysql://root:@127.0.0.1:3306/sulu_test?serverVersion=8.0"
services:
mysql:
image: mysql:${{ matrix.mysql-version }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- name: Checkout project
uses: actions/checkout@v2
with:
path: ${{ matrix.checkout-directory }}
- name: Install and configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ${{ matrix.php-extensions }}
tools: ${{ matrix.tools }}
coverage: none
- name: Install composer dependencies
if: ${{ !matrix.create-project }}
uses: ramsey/composer-install@v1
with:
composer-options: '--no-cache --working-dir=${{ matrix.working-directory }}'
dependency-versions: 'highest'
- name: Create project
if: ${{ matrix.create-project }}
run: |
composer create-project sulu/skeleton ${{ matrix.working-directory }} --repository="{\"type\":\"path\",\"url\":\"./${{ matrix.checkout-directory }}/\"}" --stability=dev --no-cache --no-interaction
cd ${{ matrix.working-directory }}
echo 'DATABASE_URL=mysql://root:@127.0.0.1:3306/sulu?serverVersion=5.7' >> .env.local
echo 'DATABASE_URL=mysql://root:@127.0.0.1:3306/sulu_test?serverVersion=5.7' >> .env.test.local
- name: Create database
if: ${{ matrix.create-database }}
run: bin/adminconsole doctrine:database:create
env: ${{ matrix.env }}
working-directory: ${{ matrix.working-directory }}
- name: Build sulu
run: bin/adminconsole sulu:build dev --no-interaction
env: ${{ matrix.env }}
working-directory: ${{ matrix.working-directory }}
- name: Build container
run: |
bin/adminconsole cache:clear --env dev
bin/websiteconsole cache:clear --env dev
bin/adminconsole cache:clear --env test
bin/websiteconsole cache:clear --env test
bin/adminconsole cache:clear --env stage
bin/websiteconsole cache:clear --env stage
bin/adminconsole cache:clear --env prod
bin/websiteconsole cache:clear --env prod
env: ${{ matrix.env }}
working-directory: ${{ matrix.working-directory }}
- name: Lint container
run: |
bin/adminconsole lint:container --env dev
bin/websiteconsole lint:container --env dev
bin/adminconsole lint:container --env test
bin/websiteconsole lint:container --env test
bin/adminconsole lint:container --env stage
bin/websiteconsole lint:container --env stage
bin/adminconsole lint:container --env prod
bin/websiteconsole lint:container --env prod
env: ${{ matrix.env }}
working-directory: ${{ matrix.working-directory }}
- name: Lint code
run: |
${{ matrix.create-project }} || composer validate --strict
bin/adminconsole doctrine:ensure-production-settings --env prod
bin/adminconsole doctrine:schema:validate
bin/adminconsole lint:twig templates
bin/adminconsole lint:yaml config
env: ${{ matrix.env }}
working-directory: ${{ matrix.working-directory }}
- name: Execute test cases
run: bin/phpunit
env: ${{ matrix.env }}
working-directory: ${{ matrix.working-directory }}
- name: Test download-language script
run: bin/adminconsole sulu:admin:download-language nl
env: ${{ matrix.env }}
working-directory: ${{ matrix.working-directory }}
- name: Install and configure Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install npm dependencies
uses: bahmutov/npm-install@v1
with:
working-directory: ${{ matrix.working-directory }}/assets/admin
useLockFile: false
- name: Build administration interface application
run: npm run build
working-directory: ${{ matrix.working-directory }}/assets/admin
php-windows:
name: "PHP ${{ matrix.php-version }} and Node.js ${{ matrix.node-version }} on Windows"
runs-on: windows-latest
env:
APP_ENV: test
APP_SECRET: a448d1dfcaa563fce56c2fd9981f662b
MAILER_URL: null://localhost
SULU_ADMIN_EMAIL:
DATABASE_URL: mysql://root:[email protected]:3306/sulu_test?serverVersion=${{ matrix.mysql-version }}
strategy:
fail-fast: false
matrix:
include:
- php-version: '7.4'
node-version: '14'
mysql-version: '8.0'
php-extensions: 'ctype, iconv, intl, mysql, pdo_mysql, php_fileinfo, imagick'
tools: 'composer:v2'
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Install and configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ${{ matrix.php-extensions }}
tools: ${{ matrix.tools }}
ini-values: 'memory_limit=-1'
- name: Install and configure MySQL
uses: shogo82148/[email protected]
with:
mysql-version: ${{ matrix.mysql-version }}
root-password: 'root'
my-cnf: |
[mysqld]
default-authentication-plugin=mysql_native_password
- name: Install composer dependencies
uses: ramsey/composer-install@v1
with:
composer-options: '--no-cache'
dependency-versions: 'highest'
- name: Build sulu
run: bin/adminconsole sulu:build dev --no-interaction
- name: Build container
run: |
bin/adminconsole cache:clear --env dev
bin/websiteconsole cache:clear --env dev
bin/adminconsole cache:clear --env test
bin/websiteconsole cache:clear --env test
bin/adminconsole cache:clear --env stage
bin/websiteconsole cache:clear --env stage
bin/adminconsole cache:clear --env prod
bin/websiteconsole cache:clear --env prod
- name: Lint container
run: |
bin/adminconsole lint:container --env dev
bin/websiteconsole lint:container --env dev
bin/adminconsole lint:container --env test
bin/websiteconsole lint:container --env test
bin/adminconsole lint:container --env stage
bin/websiteconsole lint:container --env stage
bin/adminconsole lint:container --env prod
bin/websiteconsole lint:container --env prod
- name: Lint code
run: |
composer validate --strict
bin/adminconsole doctrine:ensure-production-settings --env prod
bin/adminconsole doctrine:schema:validate
bin/adminconsole lint:twig templates
bin/adminconsole lint:yaml config
- name: Execute test cases
run: bin/phpunit
- name: Test download-language script
run: bin/adminconsole sulu:admin:download-language nl
- name: Install and configure Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install npm dependencies
uses: bahmutov/npm-install@v1
with:
working-directory: assets/admin
useLockFile: false
- name: Build administration interface application
run: npm run build
working-directory: assets/admin