Move CI to GitHub Actions (#13)
This commit is contained in:
parent
c758c27e98
commit
b7f214a212
36
.github/workflows/ci.yml
vendored
Normal file
36
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
tags-ignore:
|
||||||
|
- '*.*'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php-version: ['7.1', '7.2', '7.3']
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup PHP ${{ matrix.php-version }}
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-version }}
|
||||||
|
tools: composer:v1
|
||||||
|
- name: Composer cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.HOME }}/.composer/cache
|
||||||
|
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install -o
|
||||||
|
- name: Phpstan analysis
|
||||||
|
run: make stan
|
||||||
|
- name: Run tests
|
||||||
|
run: make test
|
||||||
|
- name: Coverage
|
||||||
|
run: bash <(curl -s https://codecov.io/bash)
|
19
.travis.yml
19
.travis.yml
@ -1,19 +0,0 @@
|
|||||||
language: php
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.composer/cache
|
|
||||||
|
|
||||||
php:
|
|
||||||
- '7.1'
|
|
||||||
- '7.2'
|
|
||||||
- '7.3'
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- flags="-o"
|
|
||||||
- composer install $flags
|
|
||||||
|
|
||||||
script: make travis
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
|
3
Makefile
3
Makefile
@ -13,6 +13,3 @@ stan:
|
|||||||
@echo "==> Running analysis"
|
@echo "==> Running analysis"
|
||||||
@php $(BIN_DIR)/phpstan analyse
|
@php $(BIN_DIR)/phpstan analyse
|
||||||
@echo "==> Analysis complete"
|
@echo "==> Analysis complete"
|
||||||
|
|
||||||
travis: test stan
|
|
||||||
@echo "==> Completed"
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[![Build Status](https://img.shields.io/travis/retailcrm/mg-bot-api-client-php/master.svg?style=flat-square)](https://travis-ci.org/retailcrm/mg-bot-api-client-php)
|
[![Build Status](https://github.com/retailcrm/mg-bot-api-client-php/workflows/ci/badge.svg)](https://github.com/retailcrm/mg-bot-api-client-php/actions)
|
||||||
[![Covarage](https://img.shields.io/codecov/c/gh/retailcrm/mg-bot-api-client-php/master.svg?style=flat-square)](https://codecov.io/gh/retailcrm/mg-bot-api-client-php)
|
[![Covarage](https://img.shields.io/codecov/c/gh/retailcrm/mg-bot-api-client-php/master.svg?logo=codecov)](https://codecov.io/gh/retailcrm/mg-bot-api-client-php)
|
||||||
[![Latest stable](https://img.shields.io/packagist/v/retailcrm/mg-bot-api-client-php.svg?style=flat-square)](https://packagist.org/packages/retailcrm/mg-bot-api-client-php)
|
[![Latest stable](https://img.shields.io/packagist/v/retailcrm/mg-bot-api-client-php.svg)](https://packagist.org/packages/retailcrm/mg-bot-api-client-php)
|
||||||
[![PHP from Packagist](https://img.shields.io/packagist/php-v/retailcrm/mg-bot-api-client-php.svg?style=flat-square)](https://packagist.org/packages/retailcrm/mg-bot-api-client-php)
|
[![PHP from Packagist](https://img.shields.io/packagist/php-v/retailcrm/mg-bot-api-client-php.svg)](https://packagist.org/packages/retailcrm/mg-bot-api-client-php)
|
||||||
|
|
||||||
|
|
||||||
# Message Gateway Bot API PHP client
|
# Message Gateway Bot API PHP client
|
||||||
|
Loading…
Reference in New Issue
Block a user