Skip to content

Commit

Permalink
Merge pull request #286 from FriendsOfCake/ci
Browse files Browse the repository at this point in the history
Switch to GA workflow
  • Loading branch information
ADmad authored Dec 21, 2020
2 parents 1abb466 + 6a4cf72 commit 39b8ff7
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 73 deletions.
6 changes: 3 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ CONTRIBUTING.md export-ignore
.gitattributes export-ignore
.gitignore export-ignore
phpunit.xml.dist export-ignore
.travis.yml export-ignore
.scrutinizer.yml export-ignore
.sticker.yml export-ignore
tests export-ignore
docs export-ignore
.github export-ignore
.coveralls.yml export-ignore
Makefile export-ignore
phpstan.neon export-ignore
phpstan-baseline.neon export-ignore
psalm.xml export-ignore
.github export-ignore
.readthedocs.yaml
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI

on: [push, pull_request]

jobs:
testsuite:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
prefer-lowest: ['']
php-version: ['7.2', '7.4', '8.0']
include:
- php-version: '7.2'
prefer-lowest: 'prefer-lowest'

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl, pdo_${{ matrix.db-type }}
coverage: pcov

- name: Composer install
run: |
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then
composer update --prefer-lowest --prefer-stable
else
composer install
fi
- name: Run PHPUnit
run: |
if [[ ${{ matrix.php-version }} == '7.4' ]]; then
vendor/bin/phpunit --coverage-clover=coverage.xml
else
vendor/bin/phpunit
fi
- name: Code Coverage Report
if: matrix.php-version == '7.4'
uses: codecov/codecov-action@v1

cs-stan:
name: Coding Standard & Static Analysis
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: mbstring, intl
coverage: none

- name: Composer Install
run: composer require --dev cakephp/cakephp-codesniffer:^4.1 psalm/phar:^3.18 phpstan/phpstan:^0.12

- name: Run phpcs
run: vendor/bin/phpcs --report=checkstyle --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/

- name: Run psalm
if: success() || failure()
run: vendor/bin/psalm.phar --output-format=github

- name: Run phpstan
if: success() || failure()
run: vendor/bin/phpstan.phar analyse --error-format=github
21 changes: 0 additions & 21 deletions .scrutinizer.yml

This file was deleted.

46 changes: 0 additions & 46 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
@@ -1,4 +1,4 @@
[![Build Status](https://img.shields.io/travis/FriendsOfCake/crud-view/master.svg?style=flat-square)](https://travis-ci.org/FriendsOfCake/crud-view)
[![Build Status](https://img.shields.io/github/workflow/status/FriendsOfCake/crud-view/CI/master?style=flat-square)](https://github.com/FriendsOfCake/crud-view/actions?query=workflow%3ACI+branch%3Amaster)
[![Total Downloads](https://img.shields.io/packagist/dt/FriendsOfCake/crud-view.svg?style=flat-square)](https://packagist.org/packages/FriendsOfCake/crud-view)
[![Latest Stable Version](https://img.shields.io/packagist/v/friendsofcake/crud-view.svg?style=flat-square)](https://packagist.org/packages/FriendsOfCake/crud-view)
[![Documentation Status](https://readthedocs.org/projects/crud-view/badge/?version=latest&style=flat-square)](https://readthedocs.org/projects/crud-view/?badge=latest)
Expand Down
4 changes: 2 additions & 2 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ parameters:
path: src/View/Widget/DateTimeWidget.php

-
message: "#^Binary operation \"\\+\" between string and array\\(\\?'data\\-enable\\-seconds' \\=\\> 'true', 'data\\-date\\-format' \\=\\> string, \\?'data\\-enable\\-time' \\=\\> 'true', \\?'data\\-alt\\-format' \\=\\> mixed, \\?'data\\-alt\\-input' \\=\\> 'true', \\?'data\\-no\\-calendar' \\=\\> 'true', \\?'data\\-alt\\-input\\-class' \\=\\> string, 'class' \\=\\> array\\('input\\-group', 'flatpickr'\\)\\) results in an error\\.$#"
message: "#^Binary operation \"\\+\" between string and array\\('data\\-date\\-format' \\=\\> string, \\?'data\\-alt\\-format' \\=\\> mixed, \\?'data\\-alt\\-input' \\=\\> 'true', \\?'data\\-no\\-calendar' \\=\\> 'true', \\?'data\\-enable\\-seconds' \\=\\> 'true', \\?'data\\-enable\\-time' \\=\\> 'true', 'data\\-wrap' \\=\\> mixed, \\?'data\\-alt\\-input\\-class' \\=\\> string, \\.\\.\\.\\) results in an error\\.$#"
count: 1
path: src/View/Widget/DateTimeWidget.php

-
message: "#^Binary operation \"\\+\\=\" between array\\<string\\>\\|string and array\\(\\?'data\\-enable\\-seconds' \\=\\> 'true', 'data\\-date\\-format' \\=\\> string, \\?'data\\-enable\\-time' \\=\\> 'true', \\?'data\\-alt\\-format' \\=\\> mixed, \\?'data\\-alt\\-input' \\=\\> 'true', \\?'data\\-no\\-calendar' \\=\\> 'true'\\) results in an error\\.$#"
message: "#^Binary operation \"\\+\\=\" between array\\<string\\>\\|string and array\\('data\\-date\\-format' \\=\\> string, \\?'data\\-alt\\-format' \\=\\> mixed, \\?'data\\-alt\\-input' \\=\\> 'true', \\?'data\\-no\\-calendar' \\=\\> 'true', \\?'data\\-enable\\-seconds' \\=\\> 'true', \\?'data\\-enable\\-time' \\=\\> 'true', 'data\\-wrap' \\=\\> mixed\\) results in an error\\.$#"
count: 1
path: src/View/Widget/DateTimeWidget.php

Expand Down

0 comments on commit 39b8ff7

Please sign in to comment.