Skip to content

Commit

Permalink
Merge 3fd412b into 14ecd1a
Browse files Browse the repository at this point in the history
  • Loading branch information
mikey179 committed Feb 18, 2020
2 parents 14ecd1a + 3fd412b commit 2a0cc06
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 56 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: PHPStan

on:
push:
branches:
- master
pull_request:

jobs:
tests:
name: PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['7.3', '7.4']

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

- name: Set up PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
tools: cs2pr, phpstan:0.12.9

- name: Validate composer.json and composer.lock
run: composer validate

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: PHPStan
run: phpstan analyse --error-format=checkstyle | cs2pr
66 changes: 66 additions & 0 deletions .github/workflows/runTests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Tests

on:
push:
branches:
- master
pull_request:

jobs:
tests:
name: PHP ${{ matrix.php-versions }} on ${{ matrix.os }} w/ ${{ matrix.dependencies }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php-versions: ['7.3', '7.4']
os: [ubuntu-latest, windows-latest, macOS-latest]
dependencies: ['install', 'update --prefer-lowest', 'update']

steps:
- name: Configure git
if: runner.os == 'Windows'
run: git config --system core.autocrlf false; git config --system core.eol lf

- name: Checkout
uses: actions/checkout@v2

- name: Set up PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
coverage: xdebug

- name: Setup Problem Matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Validate composer.json and composer.lock
run: composer validate

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer ${{ matrix.dependencies }} --prefer-dist --no-progress --no-suggest

- name: Run test suite
run: composer run-script test -- --coverage-text

- name: Notify Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
composer require php-coveralls/php-coveralls
composer run-script php-coveralls -- --verbose
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Provides assertions for unit tests.
Package status
--------------

[![Build Status](https://secure.travis-ci.org/bovigo/assert.png)](http://travis-ci.org/bovigo/assert) [![Build Status Windows](https://ci.appveyor.com/api/projects/status/t1u7ylbvdkbqqxyv?svg=true)](https://ci.appveyor.com/project/mikey179/assert) [![Coverage Status](https://coveralls.io/repos/github/bovigo/assert/badge.svg?branch=master)](https://coveralls.io/github/bovigo/assert?branch=master)

![Build Status](https://github.com/bovigo/assert/workflows/Tests/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/bovigo/assert/badge.svg?branch=master)](https://coveralls.io/github/bovigo/assert?branch=master)

[![Latest Stable Version](https://poser.pugx.org/bovigo/assert/version.png)](https://packagist.org/packages/bovigo/assert) [![Latest Unstable Version](https://poser.pugx.org/bovigo/assert/v/unstable.png)](//packagist.org/packages/bovigo/assert)

Expand Down
28 changes: 0 additions & 28 deletions appveyor.yml

This file was deleted.

6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@
}
},
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"scripts": {
"test": "phpunit",
"php-coveralls": "php-coveralls"
}
}

0 comments on commit 2a0cc06

Please sign in to comment.