Skip to content

Commit 477d68b

Browse files
committed
Use GitHub Actions.
1 parent 4d3a232 commit 477d68b

File tree

5 files changed

+59
-49
lines changed

5 files changed

+59
-49
lines changed

.gitattributes

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
/.gitattributes export-ignore
2-
/.gitignore export-ignore
3-
/.scrutinizer.yml export-ignore
4-
/.travis.yml export-ignore
5-
/build.xml export-ignore
6-
/phpunit.xml export-ignore
7-
/README.md export-ignore
1+
/.gitattributes export-ignore
2+
/.github/ export-ignore
3+
/.gitignore export-ignore
4+
/build.xml export-ignore
5+
/phpunit.xml export-ignore
6+
/README.md export-ignore

.github/workflows/unit.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
on:
2+
- "pull_request"
3+
- "push"
4+
5+
name: "unit"
6+
7+
permissions:
8+
contents: "read"
9+
10+
jobs:
11+
tests:
12+
name: "Tests"
13+
runs-on: "ubuntu-latest"
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
php-version:
19+
- "8.1"
20+
- "8.2"
21+
- "8.3"
22+
23+
steps:
24+
- name: "Checkout"
25+
uses: "actions/checkout@v3"
26+
27+
- name: "Install PHP with extensions"
28+
uses: "shivammathur/setup-php@v2"
29+
with:
30+
php-version: "${{ matrix.php-version }}"
31+
extensions: "xdebug"
32+
33+
- name: "Cache dependencies installed with Composer"
34+
uses: "actions/cache@v2"
35+
with:
36+
path: "~/.composer/cache"
37+
key: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}"
38+
restore-keys: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
39+
40+
- name: "Install dependencies with Composer"
41+
run: "composer update --no-ansi --no-interaction --no-progress"
42+
43+
- name: "Run tests with PHPUnit"
44+
run: "bin/phing unit"
45+
46+
- name: "Upload to Codecov"
47+
uses: "codecov/codecov-action@v2"
48+
with:
49+
files: "test/coverage.xml"
50+
verbose: true

.scrutinizer.yml

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

.travis.yml

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

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
<a href="https://packagist.org/packages/plaisio/exception-handler-core"><img src="https://poser.pugx.org/plaisio/exception-handler-core/v/stable" alt="Latest Stable Version"/></a>
2323
</td>
2424
<td>
25-
<a href="https://travis-ci.com/PhpPlaisio/exception-handler-core"><img src="https://travis-ci.com/PhpPlaisio/exception-handler-core.svg?branch=master" alt="Build Status"/></a><br/>
26-
<a href="https://scrutinizer-ci.com/g/PhpPlaisio/exception-handler-core/?branch=master"><img src="https://scrutinizer-ci.com/g/PhpPlaisio/exception-handler-core/badges/coverage.png?b=master" alt="Code Coverage"/></a>
25+
<a href="https://github.com/PhpPlaisio/exception-handler-core/actions/workflows/unit.yml"><img src="https://github.com/PhpPlaisio/exception-handler-core/actions/workflows/unit.yml/badge.svg" alt="Build Status"/></a><br/>
26+
<a href="https://codecov.io/gh/PhpPlaisio/exception-handler-core"><img src="https://codecov.io/gh/PhpPlaisio/exception-handler-core/branch/master/graph/badge.svg" alt="Code Coverage"/></a>
2727
</td>
2828
<td>
2929
<a href="https://scrutinizer-ci.com/g/PhpPlaisio/exception-handler-core/?branch=master"><img src="https://scrutinizer-ci.com/g/PhpPlaisio/exception-handler-core/badges/quality-score.png?b=master" alt="Scrutinizer Code Quality"/></a>
@@ -32,7 +32,6 @@
3232
</tbody>
3333
</table>
3434

35-
36-
# License
35+
# License
3736

3837
The project is licensed under the MIT license.

0 commit comments

Comments
 (0)