Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.

Commit 46bca7c

Browse files
authored
Merge pull request #4 from Saritasa/github-actions
Changed Travis to Github Actions
2 parents 3e82279 + 0ba2bd0 commit 46bca7c

File tree

4 files changed

+67
-22
lines changed

4 files changed

+67
-22
lines changed

.github/workflows/phpcs.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: PHP Codesniffer
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
phpcs:
7+
name: PHP Codesniffer
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: '7.4'
17+
18+
- name: Validate composer.json and composer.lock
19+
run: composer validate
20+
21+
- name: Install dependencies
22+
run: composer install --dev --prefer-dist --no-progress --no-suggest --no-interaction
23+
24+
- name: Run code sniffer
25+
run: vendor/bin/phpcs

.github/workflows/phpunit.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: PHP Unit
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build-test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php-versions: [ '7.1', '7.2', '7.3', '7.4' ]
11+
name: PHP ${{ matrix.php-versions }} - PHPUnit
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: ${{ matrix.php-versions }}
20+
coverage: xdebug
21+
22+
- name: Check PHP Version
23+
run: php -v
24+
25+
- name: Validate composer.json and composer.lock
26+
run: composer validate
27+
28+
- name: Install dependencies
29+
run: composer install --dev --prefer-dist --no-progress --no-suggest --no-interaction
30+
31+
- name: Run test suite
32+
run: vendor/bin/phpunit --coverage-clover=coverage.xml
33+
34+
- name: Upload Codecov
35+
uses: codecov/codecov-action@v1
36+
with:
37+
file: ./coverage.xml
38+
flags: unittests
39+
fail_ci_if_error: false
40+
verbose: true

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
# Laravel Entity Services
3-
[![Build Status](https://travis-ci.org/Saritasa/php-laravel-entity-services.svg?branch=master)](https://travis-ci.org/Saritasa/php-laravel-entity-services)
3+
[![PHP Unit](https://github.com/Saritasa/php-laravel-entity-services/workflows/PHP%20Unit/badge.svg)](https://github.com/Saritasa/php-laravel-entity-services/actions)
4+
[![PHP CodeSniffer](https://github.com/Saritasa/php-laravel-entity-services/workflows/PHP%20Codesniffer/badge.svg)](https://github.com/Saritasa/php-laravel-entity-services/actions)
45
[![codecov](https://codecov.io/gh/Saritasa/php-laravel-entity-services/branch/master/graph/badge.svg)](https://codecov.io/gh/Saritasa/php-laravel-entity-services)
56
[![PHPv](https://img.shields.io/packagist/php-v/saritasa/laravel-entity-services.svg)](http://www.php.net)
67
[![Downloads](https://img.shields.io/packagist/dt/saritasa/laravel-entity-services.svg)](https://packagist.org/packages/saritasa/laravel-entity-services)

0 commit comments

Comments
 (0)