Skip to content

Commit fb0bf7f

Browse files
authored
Merge pull request #20 from php-parallel-lint/github-actions
Added GitHub Actions for testing
2 parents 57824c5 + 14aa47c commit fb0bf7f

File tree

4 files changed

+56
-40
lines changed

4 files changed

+56
-40
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
/.github export-ignore
12
/tests export-ignore
23
.gitattributes export-ignore
34
.gitignore export-ignore
4-
.travis.yml export-ignore
55
phpunit.xml.dist export-ignore

.github/workflows/test.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Run unit tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
# Allow manually triggering the workflow.
7+
workflow_dispatch:
8+
9+
# Cancels all previous workflow runs for the same branch that have not yet completed.
10+
concurrency:
11+
# The concurrency group contains the workflow name and the branch name.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
test:
17+
name: Run tests on PHP ${{ matrix.php }}
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
php:
23+
- '5.4'
24+
- '5.5'
25+
- '5.6'
26+
- '7.0'
27+
- '7.1'
28+
- '7.2'
29+
- '7.3'
30+
- '7.4'
31+
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v2
35+
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: ${{ matrix.php }}
40+
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
41+
coverage: none
42+
tools: cs2pr
43+
44+
- name: Install Composer dependencies
45+
uses: ramsey/composer-install@v2
46+
47+
- name: 'Linting code'
48+
run: ./vendor/bin/parallel-lint --exclude vendor . --exclude git . --checkstyle | cs2pr
49+
50+
- name: 'Run unit tests'
51+
run: ./vendor/bin/phpunit
52+
53+
- name: 'Check var dump on own code'
54+
run: ./var-dump-check src

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ or setting for ANT:
7979

8080
------
8181

82-
[![Build Status](https://travis-ci.org/php-parallel-lint/PHP-Var-Dump-Check.svg?branch=master)](https://travis-ci.org/php-parallel-lint/PHP-Var-Dump-Check)
82+
[![Build Status](https://github.com/php-parallel-lint/PHP-Var-Dump-Check/actions/workflows/test.yml/badge.svg)](https://github.com/php-parallel-lint/PHP-Var-Dump-Check/actions/workflows/test.yml)
8383
[![Downloads this Month](https://img.shields.io/packagist/dm/php-parallel-lint/php-var-dump-check.svg)](https://packagist.org/packages/php-parallel-lint/php-var-dump-check)
8484
[![Latest stable](https://img.shields.io/packagist/v/php-parallel-lint/php-var-dump-check.svg)](https://packagist.org/packages/php-parallel-lint/php-var-dump-check)

0 commit comments

Comments
 (0)