Skip to content
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
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches-ignore:
- 'master'
tags-ignore:
- '**'
paths:
- '**.php'
- 'composer.lock'
- 'phpcs.xml.dist'
- 'phpunit.xml.dist'

jobs:
test:
name: Test (PHP ${{ matrix.php-version }})

runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
php-version:
- '7.2'
- '7.3'
- '7.4'
- '8.0'

env:
APP_ENV: prod
APP_DEBUG: 0
COMPOSER_TOKEN: ${{ secrets.MOS_EU_GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

# Setup Environment
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version}}
coverage: none
ini-values: date.timezone=Europe/Amsterdam, assert.exception=1, zend.assertions=1
tools: cs2pr, pecl

# Install Dependencies
- uses: actions/cache@v2
with:
path: |
~/.composer/cache
vendor
key: php-${{ matrix.php-version}}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: php-${{ matrix.php-version}}-composer-
- run: composer install --no-interaction --no-suggest

# Tests
- name: Codestyle
run: php vendor/bin/phpcs --parallel=`nproc --all` -q --report=checkstyle | cs2pr

- name: Setup Problem Matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Unit Tests
run: vendor/bin/phpunit
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ phpunit:
docker run --rm --user="${UID}:${GID}" -v ${PWD}:/app -w /app php:7.2-cli php vendor/bin/phpunit
docker run --rm --user="${UID}:${GID}" -v ${PWD}:/app -w /app php:7.3-cli php vendor/bin/phpunit
docker run --rm --user="${UID}:${GID}" -v ${PWD}:/app -w /app php:7.4-cli php vendor/bin/phpunit
docker run --rm --user="${UID}:${GID}" -v ${PWD}:/app -w /app php:8.0-cli php vendor/bin/phpunit
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MyOnlineStore Common Collection
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![Build Status](https://travis-ci.org/MyOnlineStore/common-collection.svg?branch=master)](https://travis-ci.org/MyOnlineStore/common-collection)
[![Build Status](https://github.com/MyOnlineStore/common-collection/actions/workflows/ci.yml/badge.svg)](https://github.com/MyOnlineStore/common-collection/actions/workflows/ci.yml)

## Install
Install using composer
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
},
"require": {
"php": "^7.2"
"php": "^7.2||^8.0"
},
"require-dev": {
"myonlinestore/coding-standard": "^1.0",
Expand Down