Skip to content

Commit 32380f0

Browse files
authored
Merge pull request #214 from clue-labs/update-0.9
[0.9.x] Test on PHP 8.2 and update test environment
2 parents d1661c0 + 1dc1a84 commit 32380f0

File tree

4 files changed

+29
-15
lines changed

4 files changed

+29
-15
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ on:
66

77
jobs:
88
PHPUnit:
9-
runs-on: ubuntu-20.04
9+
name: PHPUnit (PHP ${{ matrix.php }})
10+
runs-on: ubuntu-22.04
1011
strategy:
1112
matrix:
1213
php:
14+
- 8.2
1315
- 8.1
1416
- 8.0
1517
- 7.4
@@ -22,10 +24,11 @@ jobs:
2224
- 5.4
2325
- 5.3
2426
steps:
25-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
2628
- uses: shivammathur/setup-php@v2
2729
with:
2830
php-version: ${{ matrix.php }}
31+
coverage: xdebug
2932
- run: composer install
3033
- run: vendor/bin/phpunit --coverage-text
3134
if: ${{ matrix.php >= 7.3 }}
@@ -34,11 +37,16 @@ jobs:
3437

3538
PHPUnit-hhvm:
3639
name: PHPUnit (HHVM)
37-
runs-on: ubuntu-18.04
40+
runs-on: ubuntu-22.04
41+
continue-on-error: true
3842
steps:
39-
- uses: actions/checkout@v2
40-
- uses: azjezz/setup-hhvm@v1
43+
- uses: actions/checkout@v3
44+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
45+
- name: Run hhvm composer.phar install
46+
uses: docker://hhvm/hhvm:3.30-lts-latest
4147
with:
42-
version: lts-3.30
43-
- run: hhvm $(which composer) install
44-
- run: hhvm vendor/bin/phpunit
48+
args: hhvm composer.phar install
49+
- name: Run hhvm vendor/bin/phpunit
50+
uses: docker://hhvm/hhvm:3.30-lts-latest
51+
with:
52+
args: hhvm vendor/bin/phpunit

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# graphp/graph
22

3-
[![CI status](https://github.com/graphp/graph/actions/workflows/ci.yml/badge.svg?branch=v0.9.x)](https://github.com/graphp/graph/actions)
3+
[![CI status](https://github.com/graphp/graph/actions/workflows/ci.yml/badge.svg?branch=0.9.x)](https://github.com/graphp/graph/actions)
44

55
GraPHP is the mathematical graph/network library written in PHP.
66

7-
> You're viewing the contents of the `v0.9.x` release branch, note that active
8-
development continues on another branch, see `master` branch for more details.
9-
107
**Table of contents**
118

129
* [Quickstart examples](#quickstart-examples)
@@ -109,7 +106,7 @@ The recommended way to install this library is [through Composer](https://getcom
109106
This will install the latest supported version:
110107

111108
```bash
112-
$ composer require clue/graph:^0.9.3
109+
composer require clue/graph:^0.9.3
113110
```
114111

115112
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
@@ -129,13 +126,13 @@ To run the test suite, you first need to clone this repo and then install all
129126
dependencies [through Composer](https://getcomposer.org/):
130127

131128
```bash
132-
$ composer install
129+
composer install
133130
```
134131

135132
To run the test suite, go to the project root and run:
136133

137134
```bash
138-
$ vendor/bin/phpunit
135+
vendor/bin/phpunit
139136
```
140137

141138
## Contributing

phpunit.xml.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@
1717
<directory>./src/</directory>
1818
</include>
1919
</coverage>
20+
<php>
21+
<ini name="error_reporting" value="-1" />
22+
</php>
2023
</phpunit>

tests/VertexTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
class VertexTest extends AbstractAttributeAwareTest
1010
{
11+
/** @var Graph */
12+
private $graph;
13+
14+
/** @var Vertex */
15+
private $vertex;
16+
1117
/**
1218
* @before
1319
*/

0 commit comments

Comments
 (0)