Skip to content

Commit e999935

Browse files
committed
Use github actions instead of Travis for CI
1 parent 89c3316 commit e999935

File tree

6 files changed

+75
-24
lines changed

6 files changed

+75
-24
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
12+
strategy:
13+
matrix:
14+
#operating-system: [ubuntu-latest, windows-latest, macos-latest]
15+
operating-system: [ubuntu-latest, macos-latest]
16+
php-versions: ['7.2', '7.3', '7.4']
17+
runs-on: ${{ matrix.operating-system }}
18+
19+
name: Run tests for PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php-versions }}
29+
extensions: mbstring, intl
30+
31+
- name: Validate composer.json and composer.lock
32+
run: composer validate
33+
34+
- name: Install dependencies
35+
run: composer install --prefer-dist --no-progress --no-suggest
36+
37+
- name: Run tests
38+
run: vendor/bin/phing tests
39+
40+
analyse:
41+
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v2
47+
48+
- name: Setup PHP
49+
uses: shivammathur/setup-php@v2
50+
with:
51+
php-version: '7.4'
52+
extensions: mbstring, intl
53+
coverage: pcov
54+
55+
- name: Install dependencies
56+
run: composer install --prefer-dist --no-progress --no-suggest
57+
58+
- name: Run all checks
59+
run: vendor/bin/phing all

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
/coverage.xml
21
/vendor/

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Debug functions for PHP
22

3-
[![Build Status](https://travis-ci.org/fabacino/php-debug-functions.svg?branch=master)](https://travis-ci.org/fabacino/php-debug-functions)
3+
![CI](https://github.com/fabacino/php-debug-functions/workflows/CI/badge.svg)
44
[![codecov](https://codecov.io/gh/fabacino/php-debug-functions/branch/master/graph/badge.svg)](https://codecov.io/gh/fabacino/php-debug-functions)
55

66
A collection of simple debug functions which might be helpful in case a full-fledged debugger is not available.

build.xml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project name="Debug functions" default="all">
2+
<project name="Debug functions" default="no-coverage">
33

4-
<target name="all" depends="tests,analyse,cs"/>
4+
<target name="all" depends="coverage,analyse,cs"/>
5+
6+
<target name="no-coverage" depends="tests,analyse,cs"/>
57

68
<target name="tests">
9+
<exec
10+
executable="vendor/bin/phpunit"
11+
logoutput="true"
12+
passthru="true"
13+
checkreturn="true"
14+
/>
15+
</target>
16+
17+
<target name="coverage">
718
<exec
819
executable="vendor/bin/phpunit"
920
logoutput="true"
1021
passthru="true"
1122
checkreturn="true"
1223
>
24+
<arg value="--coverage-clover"/>
25+
<arg value="build/logs/clover.xml"/>
1326
</exec>
1427
</target>
1528

phpunit.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,4 @@
1111
<directory>./src/</directory>
1212
</whitelist>
1313
</filter>
14-
15-
<logging>
16-
<log type="coverage-clover" target="coverage.xml"/>
17-
</logging>
1814
</phpunit>

0 commit comments

Comments
 (0)