Skip to content

Commit e1d37ba

Browse files
committed
build: add GitHub actions
1 parent e29819e commit e1d37ba

5 files changed

Lines changed: 50 additions & 37 deletions

File tree

.github/workflows/test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Test"
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
name: "Tests"
8+
9+
runs-on: ${{ matrix.operating-system }}
10+
11+
strategy:
12+
matrix:
13+
dependencies: ["lowest", "highest"]
14+
php-version:
15+
- "7.4"
16+
- "8.0"
17+
- "8.1"
18+
operating-system: ["ubuntu-latest"]
19+
20+
steps:
21+
- name: "Checkout"
22+
uses: "actions/checkout@v2"
23+
24+
- name: "Install PHP"
25+
uses: "shivammathur/setup-php@v2"
26+
with:
27+
coverage: "none"
28+
php-version: "${{ matrix.php-version }}"
29+
30+
- name: "Cache dependencies"
31+
uses: "actions/cache@v2"
32+
with:
33+
path: "~/.composer/cache"
34+
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
35+
restore-keys: "php-${{ matrix.php-version }}-composer-"
36+
37+
- name: "Install lowest dependencies"
38+
if: ${{ matrix.dependencies == 'lowest' }}
39+
run: "composer update --prefer-lowest --prefer-dist --no-interaction --no-progress --no-suggest"
40+
41+
- name: "Install highest dependencies"
42+
if: ${{ matrix.dependencies == 'highest' }}
43+
run: "composer update --prefer-dist --no-interaction --no-progress --no-suggest"
44+
45+
- name: "Unit tests"
46+
run: "vendor/bin/phpunit"

.travis.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Blocking Component
33

44
[![Latest Version](https://img.shields.io/github/release/brainbits/blocking.svg?style=flat-square)](https://github.com/brainbits/blocking/releases)
55
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
6-
[![Build Status](https://img.shields.io/travis/brainbits/blocking/master.svg?style=flat-square)](https://travis-ci.org/brainbits/blocking)
76
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/brainbits/blocking.svg?style=flat-square)](https://scrutinizer-ci.com/g/brainbits/blocking/code-structure)
87
[![Quality Score](https://img.shields.io/scrutinizer/g/brainbits/blocking.svg?style=flat-square)](https://scrutinizer-ci.com/g/brainbits/blocking)
98
[![Total Downloads](https://img.shields.io/packagist/dt/brainbits/blocking.svg?style=flat-square)](https://packagist.org/packages/brainbits/blocking)

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
"php": "^7.4|^8.0"
1515
},
1616
"require-dev": {
17-
"mikey179/vfsstream": "^1.2",
17+
"mikey179/vfsstream": "^1.6.10",
1818
"phpunit/phpunit": "^9.5",
1919
"symfony/http-foundation": ">=4.4",
2020
"symfony/security-core": ">=4.4",
21-
"phpspec/prophecy-phpunit": "^2.0"
21+
"phpspec/prophecy": "^1.14",
22+
"phpspec/prophecy-phpunit": "^2.0.1"
2223
},
2324
"suggest": {
2425
"symfony/http-foundation": "If you want to use the SymfonySessionOwnerFactory",

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
convertNoticesToExceptions="true"
66
convertWarningsToExceptions="true">
77
<testsuite name="blocking">
8-
<directory suffix=".php">Tests</directory>
8+
<directory suffix=".php">tests</directory>
99
</testsuite>
1010
</phpunit>

0 commit comments

Comments
 (0)