-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from luca-rath/feature/github-actions
Replace travis with github actions
- Loading branch information
Showing
4 changed files
with
81 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Test application | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- '[0-9]+.[0-9]+' | ||
- '[0-9]+.x' | ||
|
||
jobs: | ||
test: | ||
name: "Test and build with php ${{ matrix.php-version }}" | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- php-version: '5.5' | ||
php-extensions: 'ctype, iconv, mysql, gd' | ||
tools: 'composer:v1' | ||
|
||
- php-version: '7.4' | ||
php-extensions: 'ctype, iconv, mysql, imagick' | ||
tools: 'composer:v2' | ||
|
||
services: | ||
mysql: | ||
image: mysql:5.5 | ||
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 | ||
|
||
- 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: Get composer cache directory | ||
id: composer-cache-dir | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
id: composer-cache | ||
with: | ||
path: ${{ steps.composer-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json', 'composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: | | ||
composer validate | ||
composer update --prefer-dist --no-interaction | ||
- name: Create database | ||
run: | | ||
bin/adminconsole doctrine:database:create | ||
bin/adminconsole doctrine:database:create --env test | ||
- name: Build sulu | ||
run: bin/adminconsole sulu:build dev --no-interaction | ||
|
||
- name: Lint code | ||
run: | | ||
bin/adminconsole lint:twig app/Resources/views | ||
bin/adminconsole lint:yaml app/config | ||
- name: Execute test cases | ||
run: bin/simple-phpunit |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.