Skip to content

Commit

Permalink
Merge pull request #20 from php-parallel-lint/github-actions
Browse files Browse the repository at this point in the history
Added GitHub Actions for testing
  • Loading branch information
jrfnl authored Feb 4, 2022
2 parents 57824c5 + 14aa47c commit fb0bf7f
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/.github export-ignore
/tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
phpunit.xml.dist export-ignore
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Run unit tests

on:
pull_request:
push:
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Run tests on PHP ${{ matrix.php }}
runs-on: ubuntu-latest

strategy:
matrix:
php:
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
coverage: none
tools: cs2pr

- name: Install Composer dependencies
uses: ramsey/composer-install@v2

- name: 'Linting code'
run: ./vendor/bin/parallel-lint --exclude vendor . --exclude git . --checkstyle | cs2pr

- name: 'Run unit tests'
run: ./vendor/bin/phpunit

- name: 'Check var dump on own code'
run: ./var-dump-check src
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ or setting for ANT:

------

[![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)
[![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)
[![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)
[![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 comments on commit fb0bf7f

Please sign in to comment.