Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Apr 18, 2021
1 parent 2a7cc6f commit 4322d6d
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 66 deletions.
70 changes: 39 additions & 31 deletions .github/workflows/tests.yml
@@ -1,41 +1,49 @@
name: tests

on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
push:
pull_request:
schedule:
- cron: '0 0 * * 3'

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php: [7.4, 7.3]
os: [ubuntu-latest, windows-latest]
tests:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os:
- "ubuntu-latest"
- "windows-latest"
php:
- "7.3"
- "7.4"
- "8.0"
dependencies:
- "locked"
- "highest"
- "lowest"
experimental:
- false

name: PHP${{ matrix.php }} on ${{ matrix.os }}
name: PHP${{ matrix.php }}-${{ matrix.os }} (${{ matrix.dependencies }})

steps:
- name: Checkout code
uses: actions/checkout@v1
steps:
- name: Checkout code
uses: actions/checkout@v1

- name: Cache dependencies
uses: actions/cache@v1
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 }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, bcmath, intl, fileinfo
coverage: none

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite3, pdo_sqlite, bcmath, gd, exif, iconv, imagick
coverage: none
- name: Install dependencies
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist --no-cache"

- name: Install dependencies
run: |
composer update --prefer-stable --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit
- name: Execute tests
run: vendor/bin/phpunit
1 change: 1 addition & 0 deletions .php_cs
Expand Up @@ -20,6 +20,7 @@ return PhpCsFixer\Config::create()
'phpdoc_align' => false,
'phpdoc_no_empty_return' => false,
'phpdoc_order' => true,
'php_unit_method_casing' => false,
'pre_increment' => false,
'self_accessor' => false,
'single_trait_insert_per_statement' => false,
Expand Down
14 changes: 4 additions & 10 deletions README.md
Expand Up @@ -3,21 +3,13 @@ Avatar Component for Orchestra Platform

Avatar Component provide support for driver based avatar provider for your Laravel, PHP or Orchestra Platform application.

[![Build Status](https://travis-ci.org/orchestral/avatar.svg?branch=6.x)](https://travis-ci.org/orchestral/avatar)
[![tests](https://github.com/orchestral/avatar/workflows/tests/badge.svg?branch=6.x)](https://github.com/orchestral/avatar/actions?query=workflow%3Atests+branch%3A6.x)
[![Latest Stable Version](https://poser.pugx.org/orchestra/avatar/version)](https://packagist.org/packages/orchestra/avatar)
[![Total Downloads](https://poser.pugx.org/orchestra/avatar/downloads)](https://packagist.org/packages/orchestra/avatar)
[![Latest Unstable Version](https://poser.pugx.org/orchestra/avatar/v/unstable)](//packagist.org/packages/orchestra/avatar)
[![License](https://poser.pugx.org/orchestra/avatar/license)](https://packagist.org/packages/orchestra/avatar)
[![Coverage Status](https://coveralls.io/repos/github/orchestral/avatar/badge.svg?branch=6.x)](https://coveralls.io/github/orchestral/avatar?branch=6.x)

## Table of Content

* [Version Compatibility](#compatibility)
* [Installation](#installation)
* [Configuration](#configuration)
* [Usage](#usage)
* [Changelog](https://github.com/orchestral/avatar/releases)

## Version Compatibility

Laravel | Avatar
Expand All @@ -34,7 +26,9 @@ Laravel | Avatar

To install through composer, run the following command from terminal:

composer require "orchestra/avatar"
```bash
composer require "orchestra/avatar"
```

### Configuration

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -21,11 +21,11 @@
}
},
"require": {
"php": ">=7.3",
"php": "^7.3 || ^8.0",
"orchestra/support": "^6.0"
},
"require-dev": {
"orchestra/testbench": "^6.0"
"orchestra/testbench": "^6.17"
},
"extra": {
"branch-alias": {
Expand Down
49 changes: 26 additions & 23 deletions phpunit.xml
@@ -1,25 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
>

<testsuites>
<testsuite name="Avatar Test Suite">
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist addUncoveredFilesFromWhitelist="false">
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true">
<coverage includeUncoveredFiles="false">
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<testsuites>
<testsuite name="feature">
<directory suffix="Test.php">./tests/Feature/</directory>
</testsuite>
<testsuite name="unit">
<directory suffix="Test.php">./tests/Unit/</directory>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit 4322d6d

Please sign in to comment.