Skip to content

Commit 4631c73

Browse files
authored
Merge pull request #145 from t0mmy742/github-ci
Replaced Travis CI with Github Actions
2 parents 08bc54f + 83c0862 commit 4631c73

File tree

4 files changed

+54
-27
lines changed

4 files changed

+54
-27
lines changed

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
/.coveralls.yml export-ignore
88
/.editorconfig export-ignore
99
/.gitattributes export-ignore
10+
/.github export-ignore
1011
/.gitignore export-ignore
11-
/.travis.yml export-ignore
1212
/CODE_OF_CONDUCT.md export-ignore
1313
/CONTRIBUTING.md export-ignore
1414
/README.md export-ignore

.github/workflows/tests.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
name: Tests PHP ${{ matrix.php }}
8+
runs-on: ubuntu-latest
9+
continue-on-error: ${{ matrix.experimental }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
php: [7.2, 7.3, 7.4, 8.0]
14+
experimental: [false]
15+
include:
16+
- php: 8.0
17+
analysis: true
18+
- php: 8.1
19+
experimental: true
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Set up PHP ${{ matrix.php }}
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
coverage: xdebug
30+
31+
- name: Install dependencies with Composer
32+
uses: ramsey/composer-install@v1
33+
34+
- name: Coding standards
35+
if: matrix.analysis
36+
run: vendor/bin/phpcs
37+
38+
- name: Static analysis
39+
if: matrix.analysis
40+
run: vendor/bin/phpstan analyse src
41+
42+
- name: Tests
43+
run: vendor/bin/phpunit --coverage-clover clover.xml
44+
45+
- name: Upload coverage results to Coveralls
46+
if: matrix.analysis
47+
env:
48+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
run: |
50+
composer require php-coveralls/php-coveralls -n
51+
vendor/bin/php-coveralls --coverage_clover=clover.xml -v

.travis.yml

-24
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Slim PSR-7 Object Decorators
44

5-
[![Build Status](https://travis-ci.org/slimphp/Slim-Http.svg?branch=master)](https://travis-ci.org/slimphp/Slim-Http)
5+
[![Build Status](https://github.com/slimphp/Slim-Http/workflows/Tests/badge.svg?branch=master)](https://github.com/slimphp/Slim-Http/actions?query=branch:master)
66
[![Coverage Status](https://coveralls.io/repos/slimphp/Slim-Http/badge.svg?branch=master&service=github)](https://coveralls.io/github/slimphp/Slim-Http?branch=master)
77
[![Total Downloads](https://poser.pugx.org/slim/http/downloads)](https://packagist.org/packages/slim/http)
88
[![License](https://poser.pugx.org/slim/http/license)](https://packagist.org/packages/slim/http)
@@ -17,7 +17,7 @@ $ composer require slim/http
1717
```
1818

1919
This will install the `slim/http` component and all required dependencies.
20-
PHP 7.1, or newer, is required.
20+
PHP 7.2, or newer, is required.
2121

2222
## Tests
2323

0 commit comments

Comments
 (0)