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

Update github actions #22

Merged
merged 3 commits into from
Dec 23, 2020
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
39 changes: 33 additions & 6 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,45 @@ on:
push:
branches:
- master
- develop
- '[0-9]+.[0-9]+'

jobs:
test:
name: "Run tests with php ${{ matrix.php-version }}"
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

env:
DATABASE_URL: mysql://root:root@127.0.0.1:3306/su_theme_test?serverVersion=5.7
DATABASE_CHARSET: utf8mb4
DATABASE_COLLATE: utf8mb4_unicode_ci

strategy:
fail-fast: false
matrix:
include:
- php-version: '5.5'
composer-flags: '--prefer-dist --prefer-lowest --no-interaction --prefer-stable'
- php-version: '7.3'
composer-flags: '--prefer-lowest --prefer-stable --prefer-dist --no-interaction'
tools: 'composer:v1'
lint: false
env:
SYMFONY__DEPRECATIONS__HELPER: disabled
SYMFONY_DEPRECATIONS_HELPER: disabled

- php-version: '7.4'
composer-flags: '--prefer-dist --no-interaction'
tools: 'composer:v2'
lint: true
env:
SYMFONY__DEPRECATIONS__HELPER: weak
SYMFONY_DEPRECATIONS_HELPER: disabled

services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5

steps:
- name: Checkout project
Expand All @@ -36,6 +53,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: 'imagick'
tools: ${{ matrix.tools }}

- name: Get composer cache directory
Expand All @@ -56,6 +74,15 @@ jobs:
composer validate --strict
composer update ${{ matrix.composer-flags }}

- name: Lint
if: ${{ matrix.lint }}
run: |
Tests/Application/bin/adminconsole cache:clear --env dev
Tests/Application/bin/websiteconsole cache:clear --env dev
composer lint
env: ${{ matrix.env }}

luca-rath marked this conversation as resolved.
Show resolved Hide resolved
- name: Run tests
run: time vendor/bin/phpunit
run: composer test
env: ${{ matrix.env }}

35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<a href="https://github.com/sulu/sulu/releases" target="_blank">
<img src="https://img.shields.io/badge/sulu%20compatibility-%3E=2.0-52b6ca.svg" alt="Sulu compatibility">
</a>
<a href="https://github.com/sulu/SuluThemeBundle/actions" target="_blank">
<img src="https://img.shields.io/github/workflow/status/sulu/SuluThemeBundle/Test%20application/master.svg?label=github-actions" alt="GitHub actions status">
</a>
</p>
<br/>

Expand Down
2 changes: 1 addition & 1 deletion Tests/Application/config/config_website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ imports:
- config.yaml

framework:
router: { resource: "%kernel.project_dir%/config/routing_website.yml" }
router: { resource: "%kernel.project_dir%/config/routing_website.yaml" }
15 changes: 12 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,21 @@
"lint": [
"@lint-composer",
"@lint-yaml",
"@phpstan"
"@phpstan",
"@lint-container"
],
"lint-composer": "@composer validate --strict",
"lint-yaml": "@php Tests/Application/bin/adminconsole lint:yaml Resources/config",
"lint-twig": "@php Tests/Application/bin/adminconsole lint:yaml Resources/views",
"lint-schema": "@php Tests/Application/bin/adminconsole doctrine:schema:validate",
"lint-container": [
"@php Tests/Application/bin/adminconsole lint:container --env dev",
"@php Tests/Application/bin/websiteconsole lint:container --env dev",
"@php Tests/Application/bin/adminconsole lint:container --env test",
"@php Tests/Application/bin/websiteconsole lint:container --env test",
"@php Tests/Application/bin/adminconsole lint:container --env stage",
"@php Tests/Application/bin/websiteconsole lint:container --env stage",
"@php Tests/Application/bin/adminconsole lint:container --env prod",
"@php Tests/Application/bin/websiteconsole lint:container --env prod"
],
"test": [
"@phpunit"
],
Expand Down