Skip to content

Commit

Permalink
Migrate to github actions (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann committed May 6, 2021
1 parent 10d2759 commit 2d2687a
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 39 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: build

on:
push:
pull_request_target:
pull_request:

jobs:
php-cs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout repository

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- uses: ramsey/composer-install@v1
with:
dependency-versions: 'highest'

- name: Static Code Analysis
run: composer lint

test:
runs-on: ${{ matrix.operating-system }}
needs:
- php-cs
strategy:
fail-fast: true
matrix:
operating-system: [ ubuntu-latest ]
php: [ '7.2', '7.3', '7.4', '8.0' ]
dependencies: [ 'lowest', 'highest' ]

name: PHP ${{ matrix.php }} on ${{ matrix.operating-system }} with ${{ matrix.dependencies }} dependencies

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

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov

- name: Composer install
uses: ramsey/composer-install@v1
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: ${{ matrix.composer-options }}

- name: PHPUnit + Code coverage
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
- name: Code coverage upload to Coveralls
if: matrix.php == '8.0' && matrix.dependencies == 'highest'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer require php-coveralls/php-coveralls
vendor/bin/php-coveralls -v --coverage_clover=build/logs/clover.xml
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 @@ -3,7 +3,7 @@ Extensions for the Symfony property-info component.
* Magic class method extractor [DocBlockMagicExtractor](src/Extractor/DocBlockMagicExtractor.php)
* Support for merging results of multiple extractors where possible

[![Build Status](https://travis-ci.org/DerManoMann/property-info-extras.png)](https://travis-ci.org/DerManoMann/property-info-extras)
[![Build Status](https://github.com/DerManoMann/property-info-extras/workflows/build/badge.svg)](https://github.com/DerManoMann/property-info-extras/actions?query=workflow:build)
[![Coverage Status](https://coveralls.io/repos/github/DerManoMann/property-info-extras/badge.svg)](https://coveralls.io/github/DerManoMann/property-info-extras)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Expand Down

0 comments on commit 2d2687a

Please sign in to comment.