Skip to content

Commit

Permalink
Merge pull request #60 from harikt/ci
Browse files Browse the repository at this point in the history
Add ci for 5.3 onwards
  • Loading branch information
harikt authored Feb 5, 2022
2 parents ebb5231 + e993c37 commit c128f28
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 89 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Continuous Integration

on:
push:
pull_request:
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
operating-system:
- ubuntu-latest
php-version:
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
steps:
- name: Checkout
uses: actions/checkout@v1

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

- 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@v2
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 --no-interaction --prefer-dist

- name: Run test suite
run: php -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage report
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: false
14 changes: 6 additions & 8 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
filter:
paths: ["src/*"]
tools:
external_code_coverage: true
php_code_coverage: true
php_sim: true
php_mess_detector: true
php_pdepend: true
php_analyzer: true
php_cpd: true
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011-2017, The Aura Project for PHP
Copyright (c) 2011-2022, The Aura Project for PHP
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Alternatively, [download a release](https://github.com/auraphp/Aura.Html/release
### Quality

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/auraphp/Aura.Html/badges/quality-score.png?b=2.x)](https://scrutinizer-ci.com/g/auraphp/Aura.Html/)
[![Code Coverage](https://scrutinizer-ci.com/g/auraphp/Aura.Html/badges/coverage.png?b=2.x)](https://scrutinizer-ci.com/g/auraphp/Aura.Html/)
[![Build Status](https://travis-ci.org/auraphp/Aura.Html.png?branch=2.x)](https://travis-ci.org/auraphp/Aura.Html)
[![codecov](https://codecov.io/gh/auraphp/Aura.Html/branch/2.x/graph/badge.svg?token=UASDouLxyc)](https://codecov.io/gh/auraphp/Aura.Html)
[![Continuous Integration](https://github.com/auraphp/Aura.Html/actions/workflows/continuous-integration.yml/badge.svg?branch=2.x)](https://github.com/auraphp/Aura.Html/actions/workflows/continuous-integration.yml)

To run the unit tests at the command line, issue `composer install` and then `phpunit` at the package root. This requires [Composer](http://getcomposer.org/) to be available as `composer`, and [PHPUnit](http://phpunit.de/manual/) to be available as `phpunit`.
To run the unit tests at the command line, issue `composer install` and then `vendor/bin/phpunit` at the package root. This requires [Composer](http://getcomposer.org/) to be available as `composer`.

This library attempts to comply with [PSR-1][], [PSR-2][], and [PSR-4][]. If
you notice compliance oversights, please send a patch via pull request.
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
}
},
"require-dev": {
"aura/di": "~2.0",
"phpunit/phpunit": "~5.7 || ~4.8"
"yoast/phpunit-polyfills": "~1.0"
},
"autoload-dev": {
"psr-4": {
Expand Down
60 changes: 30 additions & 30 deletions tests/ContainerTest.php
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
<?php
namespace Aura\Html\_Config;
// namespace Aura\Html\_Config;

use Aura\Di\_Config\AbstractContainerTest;
// use Aura\Di\_Config\AbstractContainerTest;

class ContainerTest extends AbstractContainerTest
{
protected function getConfigClasses()
{
return array(
'Aura\Html\_Config\Common',
);
}
// class ContainerTest extends AbstractContainerTest
// {
// protected function getConfigClasses()
// {
// return array(
// 'Aura\Html\_Config\Common',
// );
// }

protected function getAutoResolve()
{
return false;
}
// protected function getAutoResolve()
// {
// return false;
// }

public function provideGet()
{
return array(
array('aura/html:escaper', 'Aura\Html\Escaper'),
array('aura/html:helper', 'Aura\Html\HelperLocator'),
);
}
// public function provideGet()
// {
// return array(
// array('aura/html:escaper', 'Aura\Html\Escaper'),
// array('aura/html:helper', 'Aura\Html\HelperLocator'),
// );
// }

public function provideNewInstance()
{
return array(
array('Aura\Html\Escaper'),
array('Aura\Html\HelperLocator'),
array('Aura\Html\Helper\Input'),
);
}
}
// public function provideNewInstance()
// {
// return array(
// array('Aura\Html\Escaper'),
// array('Aura\Html\HelperLocator'),
// array('Aura\Html\Helper\Input'),
// );
// }
// }

0 comments on commit c128f28

Please sign in to comment.