Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/tests.php.unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PHP Unit Tests

on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- '5.5'
- '5.6'
- '7.0'
include:
- php-version: '7.0'
allow_failure: true
continue-on-error: ${{ matrix.allow_failure || false }}
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: xdebug
extensions: gd, json, mbstring
php-version: ${{ matrix.php-version }}
- run: composer install --no-interaction --prefer-dist
- run: vendor/bin/phpunit
- uses: codecov/codecov-action@v5
if: success()
with:
token: ${{ secrets.CODECOV_TOKEN }}
- uses: coverallsapp/github-action@v2
if: success()
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ARG PHP_VERSION
FROM php:${PHP_VERSION}

RUN apk add --no-cache \
libpng \
libpng-dev \
${PHPIZE_DEPS} \
&& docker-php-ext-install gd \
&& pecl install xdebug-2.5.5 \
&& docker-php-ext-enable xdebug \
&& apk del libpng-dev ${PHPIZE_DEPS}

COPY --from=composer /usr/bin/composer /usr/bin/composer

ENV XDEBUG_MODE coverage

WORKDIR /code

CMD ["php", "./vendor/bin/phpunit"]
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"josegonzalez/dotenv": "~2.0",
"phpunit/phpunit" : "~4.8",
"satooshi/php-coveralls": "~0.6",
"scrutinizer/ocular": "~1.1",
"whatthejeff/nyancat-phpunit-resultprinter": "~1.2"
"scrutinizer/ocular": "~1.1"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 2 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"

backupGlobals="false"
strict="true"
Expand All @@ -21,12 +21,9 @@
colors="true"
forceCoversAnnotation="true"
verbose="true"

printerFile="vendor/whatthejeff/nyancat-phpunit-resultprinter/src/NyanCat/PHPUnit/ResultPrinter.php"
printerClass="NyanCat\PHPUnit\ResultPrinter"
>
<testsuites>
<testsuite name="Flysystem Github Adapter - Unit Tests">
<testsuite name="Flysystem GitHub Adapter - Unit Tests">
<directory>tests/unit-tests</directory>
</testsuite>
</testsuites>
Expand Down
Loading