Skip to content

Commit

Permalink
Merge pull request #6 from markwalet/github-actions
Browse files Browse the repository at this point in the history
GitHub actions
  • Loading branch information
markwalet authored Mar 23, 2020
2 parents 7d7d1f4 + 05cfb2f commit c63b99e
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 59 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: coverage

on: [push, pull_request]

jobs:
tests:
runs-on: ubuntu-latest

name: Coverage

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

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-php-7.4-illuminate-7.*-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
coverage: xdebug

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-suggest

- name: Calculate coverage statistics
run: phpunit --coverage-clover 'clover.xml'

- name: Send coverage statistics
uses: codecov/codecov-action@v1
54 changes: 54 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: tests

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

jobs:
tests:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [7.2, 7.3, 7.4]
illuminate: [6.*, 7.*]
stability: [prefer-lowest, prefer-stable]
include:
- illuminate: 6.*
testbench: 4.*
- illuminate: 7.*
testbench: 5.*
exclude:
- php: 7.4
illuminate: 6.*

name: P${{ matrix.php }} - I${{ matrix.illuminate }} - ${{ matrix.stability }}

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 }}-illuminate-${{ matrix.illuminate }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
coverage: none

- name: Install dependencies
run: |
composer require "illuminate/support:${{ matrix.illuminate }}" --no-interaction --no-update
composer require "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit --verbose
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ vendor/
.idea/
composer.phar
composer.lock
phpunit.xml
clover.xml
.phpunit.result.cache
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## [Unreleased](https://github.com/markwalet/dotenv-manager/compare/v1.1.0...master)

### Added
- Added Github Actions integration.
- Added PHP 7.4 support.

### Removed
- Removed support for Laravel 5.
- Removed support for PHP 7.0
- Removed support for PHP 7.1
- Removed Travis integration.

## [v1.2.1](https://github.com/markwalet/dotenv-manager/compare/v1.2.0...v1.2.1)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![MIT Licensed](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Latest Stable Version](https://poser.pugx.org/markwalet/dotenv-manager/v/stable)](https://packagist.org/packages/markwalet/dotenv-manager)
[![Build Status](https://travis-ci.com/markwalet/dotenv-manager.svg?branch=master)](https://travis-ci.com/markwalet/dotenv-manager)
[![Build status](https://img.shields.io/github/workflow/status/markwalet/dotenv-manager/tests?style=flat-square&label=tests)](https://github.com/markwalet/dotenv-manager/actions)
[![Coverage](https://codecov.io/gh/markwalet/dotenv-manager/branch/master/graph/badge.svg)](https://codecov.io/gh/markwalet/dotenv-manager)
[![StyleCI](https://github.styleci.io/repos/142404454/shield?branch=master)](https://github.styleci.io/repos/142404454)
[![Total Downloads](https://poser.pugx.org/markwalet/dotenv-manager/downloads)](https://packagist.org/packages/markwalet/dotenv-manager)
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
}
],
"require": {
"php": "^7.0",
"illuminate/support": "~5.5|6.*|7.*"
"php": "^7.2",
"illuminate/support": "6.*|7.*"
},
"require-dev": {
"orchestra/testbench": "~3.5|4.*|5.*",
"phpunit/phpunit": "^6.0|^7.0|^8.0"
"orchestra/testbench": "4.*|5.*",
"phpunit/phpunit": "^8.0|^9.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 0 additions & 3 deletions phpunit.xml.dist → phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="clover.xml"/>
</logging>
</phpunit>
10 changes: 0 additions & 10 deletions src/DotenvManagerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@

class DotenvManagerServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}

/**
* Register bindings in the container.
*
Expand Down

0 comments on commit c63b99e

Please sign in to comment.