Skip to content

Commit

Permalink
Merge pull request #101 from peter-gribanov/gitlab_ci
Browse files Browse the repository at this point in the history
Build from GitHub CI
  • Loading branch information
peter-gribanov authored Nov 30, 2020
2 parents 62a86bc + 244b1bb commit 1c699cc
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 74 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Quality assurance

on:
push:
pull_request:

jobs:
phpstan:
name: PHPStan

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 7.1
coverage: none
tools: composer:v2

- name: Install variant
run: composer require phpstan/phpstan:"0.12.*" --no-update

- name: Install Composer dependencies (highest)
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"
composer-options: "--prefer-dist --prefer-stable"

- name: PHPStan
run: vendor/bin/phpstan --memory-limit=1G analyse
84 changes: 84 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Test

on:
push:
branches:
pull_request:
branches:

jobs:
test:
name: PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }} + ${{ matrix.variant }}

runs-on: ubuntu-latest

continue-on-error: ${{ matrix.allowed-to-fail }}

strategy:
max-parallel: 6
matrix:
php-version:
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
dependencies: [highest]
allowed-to-fail: [false]
variant: [normal]
include:
- php-version: '5.5'
dependencies: highest
allowed-to-fail: false
variant: 'symfony/symfony:"2.7.*"'
- php-version: '5.5'
dependencies: highest
allowed-to-fail: false
variant: 'symfony/symfony:"2.8.*"'
- php-version: '5.5'
dependencies: highest
allowed-to-fail: false
variant: 'symfony/symfony:"3.4.*"'
- php-version: '7.1'
dependencies: highest
allowed-to-fail: false
variant: 'symfony/symfony:"4.4.*" phpunit/phpunit:"5.7.*"'

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
tools: composer:v2
extensions: zlib, bz2

- name: Install variant
if: matrix.variant != 'normal'
run: composer require ${{ matrix.variant }} --no-update

- name: "Install Composer dependencies (${{ matrix.dependencies }})"
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist --prefer-stable"

- name: Run Tests
run: vendor/bin/phpunit --coverage-clover build/coverage-clover.xml

- name: Send coverage results to Scrutinizer CI
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover build/coverage-clover.xml
- name: Send coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/coverage-clover.xml -v -c .coveralls.yml
73 changes: 0 additions & 73 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![Latest Stable Version](https://img.shields.io/packagist/v/gpslab/sitemap.svg?maxAge=3600&label=stable)](https://packagist.org/packages/gpslab/sitemap)
![PHP from Travis config](https://img.shields.io/travis/php-v/gpslab/sitemap.svg?maxAge=3600)
[![Build Status](https://img.shields.io/travis/gpslab/sitemap.svg?maxAge=3600)](https://travis-ci.org/gpslab/sitemap)
[![Coverage Status](https://img.shields.io/coveralls/gpslab/sitemap.svg?maxAge=3600)](https://coveralls.io/github/gpslab/sitemap?branch=master)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/gpslab/sitemap.svg?maxAge=3600)](https://scrutinizer-ci.com/g/gpslab/sitemap/?branch=master)
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"php": ">=5.5.0"
},
"require-dev": {
"ext-zlib": "*",
"ext-bz2": "*",
"psr/log": "~1.0",
"gpslab/compressor": "~1.0",
"symfony/console": "~2.4|~3.0|~4.0",
Expand Down

0 comments on commit 1c699cc

Please sign in to comment.