Skip to content

Commit

Permalink
Merge pull request #49 from tg-bot-api/feature/#48-replace-travis-to-…
Browse files Browse the repository at this point in the history
…github-actions

#48 try github actions
  • Loading branch information
greenplugin committed Dec 12, 2020
2 parents e88d5bf + ebeb0e0 commit 388e910
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 49 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: PHP Composer

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: 7.4
- php: 7.3
composerFlags: '--prefer-stable --prefer-lowest'
- php: 8.0
composerFlags: '--ignore-platform-reqs'

steps:
- uses: actions/checkout@v2

- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: xdebug

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer update ${{ matrix.composerFlags }} --no-interaction --prefer-dist

- name: Tests
run: vendor/bin/phpunit

- name: Scrutinizer code coverage
if: matrix.php == '7.3'
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
9 changes: 1 addition & 8 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ build:
override: true
tests:
override: [php-scrutinizer-run]
coverage:
tests:
override:
- command: composer test
coverage:
file: build/logs/clover.xml
format: clover

filter:
excluded_paths: [tests/*]
Expand All @@ -38,4 +31,4 @@ checks:
tools:
external_code_coverage:
timeout: 600
runs: 3
runs: 1
39 changes: 0 additions & 39 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
Expand Up @@ -3,7 +3,6 @@
[![Telegram bot api][ico-bot-api]][link-bot-api]
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-travis]][link-travis]
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
[![Quality Score][ico-code-quality]][link-code-quality]
[![PHP Version >= 7.2][ico-php-v]][link-php-7-2]
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"friendsofphp/php-cs-fixer": "^2.13",
"phpro/grumphp": "^1.1.0",
"phpstan/phpstan": "^0.10.6",
"phpunit/phpunit": "^7.5.2",
"phpunit/phpunit": "^8.5",
"povils/phpmnd": "^2.0",
"sebastian/phpcpd": "^5.0",
"squizlabs/php_codesniffer": "^3.4"
Expand Down

0 comments on commit 388e910

Please sign in to comment.