Skip to content

Commit

Permalink
Merge branch '4.1' into 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Nic Horstmeier committed Sep 7, 2022
2 parents e66ba21 + 10e712f commit 11b7793
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 184 deletions.
41 changes: 6 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,48 +56,19 @@ jobs:
key: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}"
restore-keys: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Authorize private packagist"
env:
COMPOSER_TOKEN: ${{ secrets.COMPOSER_TOKEN }}
run: "if [[ $COMPOSER_TOKEN ]]; then composer config --global --auth http-basic.repo.packagist.com token $COMPOSER_TOKEN; fi"

- name: "Install dependencies with composer"
run: "composer install --no-ansi --no-interaction --no-progress"

- name: "Run tests with phpunit/phpunit"
env:
SS_DATABASE_PORT: ${{ job.services.mysql.ports['3306'] }}
run: "vendor/bin/phpunit --coverage-html=build/logs/coverage/html --coverage-xml=build/logs/coverage"
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"

- name: "Archive code coverage results"
uses: "actions/upload-artifact@v2"
- name: "Upload coverage results to CodeCov"
uses: codecov/codecov-action@v1
with:
name: "coverage"
path: "build/logs/coverage/html"
files: ./coverage.xml # optional
flags: unittests # optional

- name: "Run tests with squizlabs/php_codesniffer"
run: "vendor/bin/phpcs src/ tests/ --standard=phpcs.xml.dist --report=checkstyle --report-file=build/logs/checkstyle.xml"

- name: "Archive checkstyle results"
uses: "actions/upload-artifact@v2"
with:
name: "checkstyle"
path: "build/logs/checkstyle.xml"

#- name: "Run tests with phpmd/phpmd"
# run: "vendor/bin/phpmd src xml codesize,unusedcode,naming --reportfile build/logs/pmd.xml --exclude vendor/ --exclude autoload.php"

- name: "Run tests with phploc/phploc"
run: "vendor/bin/phploc --count-tests --exclude vendor/ --log-csv build/logs/phploc.csv --log-xml build/logs/phploc.xml src/ tests/
"
- name: "Run tests with pdepend/pdepend"
run: "vendor/bin/pdepend --jdepend-xml=build/logs/jdepend.xml --ignore=vendor src"

- name: "Publish documentation"
run: "vendor/bin/phpdox -f phpdox.xml"

- name: "Archive documentation"
uses: "actions/upload-artifact@v2"
with:
name: "documentation"
path: "docs/html"
run: "vendor/bin/phpcs -s --report=summary --standard=phpcs.xml.dist --extensions=php,inc --ignore=autoload.php --ignore=vendor/ src/ tests/"
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ checks:
duplication: true

filter:
paths: [src/*, tests/*]
paths: [src/*, tests/*]
18 changes: 11 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,29 @@ env:
matrix:
include:
- php: 7.2
env: DB=MYSQL RECIPE_VERSION=4.5.x-dev PHPUNIT_TEST=1 PHPCS_TEST=1
env: DB=MYSQL RECIPE_VERSION=4.6.x-dev PHPUNIT_TEST=1
- php: 7.3
env: DB=PGSQL RECIPE_VERSION=4.6.x-dev PHPUNIT_TEST=1
env: DB=MYSQL RECIPE_VERSION=4.7.x-dev PHPUNIT_TEST=1
- php: 7.4
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_COVERAGE_TEST=1
env: DB=MYSQL RECIPE_VERSION=4.8.x-dev PHPUNIT_TEST=1
- php: 7.4
env: DB=MYSQL RECIPE_VERSION=4.9.x-dev PHPUNIT_TEST=1 PHPCS_TEST=1
- php: 7.4
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1

before_script:
- phpenv rehash
- phpenv config-rm xdebug.ini

- composer validate
- composer require --no-update silverstripe/recipe-cms:"$RECIPE_VERSION"
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.1.x-dev; fi
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql; fi
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile

script:
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/ *.php; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/; fi

after_success:
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml -F php; fi
#after_success:
#- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml -F php; fi
29 changes: 27 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
# Changelog

## [4.1.0](https://github.com/dynamic/silverstripe-flexslider/tree/4.1.0) (2020-01-07)
## [4.1.1](https://github.com/dynamic/silverstripe-flexslider/tree/4.1.1) (2021-05-26)

[Full Changelog](https://github.com/dynamic/silverstripe-flexslider/compare/4.1.0...4.1.1)

**Implemented enhancements:**

- Change default template to use includes rather than $Me [\#183](https://github.com/dynamic/silverstripe-flexslider/issues/183)

**Closed issues:**

- Recursive Lookup for Flexslider [\#201](https://github.com/dynamic/silverstripe-flexslider/issues/201)
- Can not find the FlexSlider.ss template [\#184](https://github.com/dynamic/silverstripe-flexslider/issues/184)

**Merged pull requests:**

- BUGFIX composer cleanup [\#207](https://github.com/dynamic/silverstripe-flexslider/pull/207) ([jsirish](https://github.com/jsirish))
- REFACTOR update GitHub workflow [\#206](https://github.com/dynamic/silverstripe-flexslider/pull/206) ([jsirish](https://github.com/jsirish))
- fix slider include [\#205](https://github.com/dynamic/silverstripe-flexslider/pull/205) ([korthjp17](https://github.com/korthjp17))
- CI GitHub workflow initial [\#202](https://github.com/dynamic/silverstripe-flexslider/pull/202) ([jsirish](https://github.com/jsirish))

## [4.1.0](https://github.com/dynamic/silverstripe-flexslider/tree/4.1.0) (2020-01-08)

[Full Changelog](https://github.com/dynamic/silverstripe-flexslider/compare/2.0.3...4.1.0)

**Merged pull requests:**

- bugfix - move FlexSlider include to templates/Includes [\#191](https://github.com/dynamic/silverstripe-flexslider/pull/191) ([jsirish](https://github.com/jsirish))
- UPDATE require dynamic/silverstripe-linkable [\#199](https://github.com/dynamic/silverstripe-flexslider/pull/199) ([muskie9](https://github.com/muskie9))
- bugfix - removed redundant “Development and congribution” section [\#192](https://github.com/dynamic/silverstripe-flexslider/pull/192) ([jsirish](https://github.com/jsirish))
- travis - test SilverStripe 4.1 and 4.2 [\#190](https://github.com/dynamic/silverstripe-flexslider/pull/190) ([jsirish](https://github.com/jsirish))
- bugfix - include path [\#189](https://github.com/dynamic/silverstripe-flexslider/pull/189) ([jsirish](https://github.com/jsirish))
- Feature/transifex [\#188](https://github.com/dynamic/silverstripe-flexslider/pull/188) ([jsirish](https://github.com/jsirish))
- update tests - new travis, scrutinizer, jenkinsfile [\#187](https://github.com/dynamic/silverstripe-flexslider/pull/187) ([jsirish](https://github.com/jsirish))

## [2.0.3](https://github.com/dynamic/silverstripe-flexslider/tree/2.0.3) (2019-11-05)

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

# SilverStripe Flexslider

[![CI](https://github.com/dynamic/silverstripe-flexslider/actions/workflows/ci.yml/badge.svg)](https://github.com/dynamic/silverstripe-flexslider/actions/workflows/ci.yml)
[![Build Status](https://travis-ci.org/dynamic/silverstripe-flexslider.svg?branch=master)](https://travis-ci.org/dynamic/silverstripe-flexslider)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/dynamic/silverstripe-flexslider/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/dynamic/silverstripe-flexslider/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/dynamic/silverstripe-flexslider/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/dynamic/silverstripe-flexslider/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/dynamic/silverstripe-flexslider/badges/build.png?b=master)](https://scrutinizer-ci.com/g/dynamic/silverstripe-flexslider/build-status/master)
[![codecov.io](https://codecov.io/github/dynamic/silverstripe-flexslider/coverage.svg?branch=master)](https://codecov.io/github/dynamic/silverstripe-flexslider?branch=master)

[![Latest Stable Version](https://poser.pugx.org/dynamic/flexslider/v/stable)](https://packagist.org/packages/dynamic/flexslider)
Expand Down Expand Up @@ -64,4 +63,4 @@ Please report security issues to the module maintainers directly. Please don't f


## Development and contribution
If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.
If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.
2 changes: 0 additions & 2 deletions codecov.yml

This file was deleted.

7 changes: 1 addition & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3.0",
"phpmd/phpmd": "^2.6",
"sebastian/phpcpd": "^3.0",
"phploc/phploc": "^4.0",
"pdepend/pdepend": "^2.5",
"theseer/phpdox": "^0.11.0"
"squizlabs/php_codesniffer": "^3.0"
},
"autoload": {
"psr-4": {
Expand Down
126 changes: 0 additions & 126 deletions phpdox.xml

This file was deleted.

2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<phpunit bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true">
<testsuite name="flexslider">
<testsuite name="silverstripe-flexslider">
<directory>tests</directory>
</testsuite>

Expand Down
8 changes: 7 additions & 1 deletion templates/Includes/FlexSlider.ss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
<ul class="slides">
<% loop $SlideShow %>
<li>
$Me
<% if $SlideType == Video %>
<% include Dynamic\\FlexSlider\\Model\\SlideImage_Video %>
<% else_if $SlideType == Text %>
<% include Dynamic\\FlexSlider\\Model\\SlideImage_Text %>
<% else %>
<% include Dynamic\\FlexSlider\\Model\\SlideImage_Image %>
<% end_if %>
</li>
<% end_loop %>
</ul>
Expand Down

0 comments on commit 11b7793

Please sign in to comment.