Skip to content

Commit 8899e31

Browse files
authored
Update phpunit & add github actions (#5)
* Add basic templating * Create php.yml * Limit workflow to php 7.1 due to old phpunit * Update phpunit * Update phpunit * Add build status badge * Update travis to use php 7.1 * Use correct repo
1 parent aac7aaf commit 8899e31

6 files changed

Lines changed: 1777 additions & 296 deletions

File tree

.github/workflows/php.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Validate composer.json and composer.lock
18+
run: composer validate
19+
20+
- name: Install dependencies
21+
run: composer install --prefer-dist --no-progress --no-suggest
22+
23+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
24+
# Docs: https://getcomposer.org/doc/articles/scripts.md
25+
26+
- name: Run test suite
27+
run: composer test

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@
22
language: php
33
script: make test
44
php:
5-
- 5.3
6-
- 5.4
7-
- 5.5
8-
5+
- 7.1

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ AutoPimple
44

55
The [Pimple](https://github.com/silexphp/Pimple) DI container extended with auto-injection functionality
66

7+
![PHP Composer](https://github.com/SuRaMoN/auto-pimple/workflows/PHP%20Composer/badge.svg)
78
[![Build Status](https://travis-ci.org/SuRaMoN/auto-pimple.png?branch=master)](https://travis-ci.org/SuRaMoN/auto-pimple)
89

910

composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,21 @@
66
"description": "Pimple with automated service loading",
77
"require": {
88
"pimple/pimple": "1.1.*",
9-
"psr/container": "^1.0"
9+
"psr/container": "^1.0",
10+
"php": "^7.1"
1011
},
1112
"require-dev": {
12-
"phpunit/phpunit": "3.7.*"
13+
"phpunit/phpunit": "^7.5",
14+
"roave/security-advisories": "dev-master"
1315
},
1416
"license": "MIT",
1517
"authors": [
1618
{
1719
"name": "SuRaMoN",
1820
"email": "suramon@noemail.com"
1921
}
20-
]
22+
],
23+
"scripts": {
24+
"test": "vendor/bin/phpunit"
25+
}
2126
}

0 commit comments

Comments
 (0)