Skip to content

Commit

Permalink
Merge pull request #205 from luca-rath/feature/github-actions
Browse files Browse the repository at this point in the history
Replace travis with github actions
  • Loading branch information
niklasnatter authored Jan 13, 2021
2 parents 0ec47cb + 6a15fd7 commit 12a2f5e
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 52 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/test-application.yaml
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
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

[![GitHub license](https://img.shields.io/github/license/sulu/sulu-minimal.svg)](https://github.com/sulu/sulu-minimal/blob/1.6/LICENSE)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/sulu/sulu-minimal.svg)](https://github.com/sulu/sulu-minimal/releases)
[![GitHub tag (latest by date)](https://img.shields.io/github/tag-date/sulu/sulu-minimal.svg)](https://github.com/sulu/sulu-minimal/releases)
[![Travis](https://travis-ci.org/sulu/sulu-minimal.png?branch=1.6)](https://travis-ci.org/sulu/sulu-minimal)
[![Test workflow status](https://img.shields.io/github/workflow/status/sulu/sulu-minimal/Test%20Application/1.6?label=test-workflow)](https://github.com/sulu/sulu-minimal/actions)

Welcome to the Sulu Minimal Edition - the skeleton to start a new [Sulu](https://github.com/sulu/sulu) project.

Expand Down
1 change: 0 additions & 1 deletion tests/travis.php.ini

This file was deleted.

0 comments on commit 12a2f5e

Please sign in to comment.