Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
[TASK] Switch the CI from Travis CI to GitHub actions (#199)
Browse files Browse the repository at this point in the history
This is the 6.5 backport of #197.

Fixes #190
  • Loading branch information
oliverklee committed Nov 24, 2020
1 parent 03c90ba commit 5c91c84
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 105 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
name: CI
on:
push:
pull_request:
jobs:
php-lint:
name: "PHP linter"
runs-on: ubuntu-20.04
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
tools: composer:v2
- name: "Run PHP lint"
run: "composer ci:php:lint"
strategy:
matrix:
php-version:
- 7.0
- 7.1
- 7.2
- 7.3
unit-tests:
name: "Unit tests"
runs-on: ubuntu-20.04
needs: php-lint
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: laravel_tags
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
DATABASE_HOST: 127.0.0.1
DATABASE_USER: root
DATABASE_PASSWORD: root
DATABASE_NAME: typo3
steps:
-
name: "Checkout"
uses: actions/checkout@v2
-
name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
tools: composer:v2
extensions: mysqli
- name: "Show Composer version"
run: composer --version
-
name: "Cache dependencies installed with composer"
uses: actions/cache@v1
with:
key: "php${{ matrix.php-version }}
-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.composer/cache
restore-keys: "php${{ matrix.php-version }}-composer-\n"
-
env:
TYPO3: "${{ matrix.typo3-version }}"
name: "Install TYPO3 Core"
run: |
composer require --no-progress typo3/minimal:"$TYPO3"
composer show
-
name: "Start MySQL"
run: "sudo /etc/init.d/mysql start"
-
name: "Set up TYPO3"
run: >
.Build/vendor/bin/typo3cms install:setup --no-interaction --site-setup-type="site"
--database-user-name="${DATABASE_USER}" --database-host-name="${DATABASE_HOST}"
--database-port="${{ job.services.mysql.ports[3306] }}" --database-name="${DATABASE_NAME}"
--admin-user-name="admin" --admin-password="password" --site-name="Test installation";
-
name: "Run unit tests"
run: "composer ci:tests:unit"
strategy:
matrix:
php-version:
- 7.2
- 7.3
typo3-version:
- ^8.7
- ^9.5
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/.Build/*
# Please keep the lines in this file sorted.
*.idea
/.Build/*
/.php_cs.cache
/Resources/Private/Build/vendor
/composer.lock
/nbproject
/Resources/Private/Build/vendor
/var
102 changes: 0 additions & 102 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

## 6.5.16

### Changed
- Switch the CI from Travis CI to GitHub actions (#199)

## 6.5.15

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PHPUnit TYPO3 extension

[![Build Status](https://travis-ci.org/oliverklee/ext-phpunit.svg?branch=master)](https://travis-ci.org/oliverklee/ext-phpunit)
[![GitHub CI Status](https://github.com/oliverklee/ext-phpunit/workflows/CI/badge.svg?branch=main)](https://github.com/oliverklee/ext-phpunit/actions)
[![Latest Stable Version](https://poser.pugx.org/oliverklee/phpunit/v/stable.svg)](https://packagist.org/packages/oliverklee/phpunit)
[![Total Downloads](https://poser.pugx.org/oliverklee/phpunit/downloads.svg)](https://packagist.org/packages/oliverklee/phpunit)
[![Latest Unstable Version](https://poser.pugx.org/oliverklee/phpunit/v/unstable.svg)](https://packagist.org/packages/oliverklee/phpunit)
Expand Down

0 comments on commit 5c91c84

Please sign in to comment.