Skip to content

Commit cfe58ba

Browse files
Test on PHP 8.0 and Windows too (#62)
1 parent 0ada12f commit cfe58ba

File tree

3 files changed

+105
-23
lines changed

3 files changed

+105
-23
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* text=auto
2+
13
/.gitignore export-ignore
24
/.gitattributes export-ignore
35
/.travis.yml export-ignore

.github/workflows/tests.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
tests_linux:
9+
name: PHP ${{ matrix.php }} Linux
10+
runs-on: ubuntu-20.04
11+
12+
strategy:
13+
matrix:
14+
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
15+
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@v2
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php }}
24+
tools: composer:v2
25+
coverage: none
26+
27+
- name: Setup Problem Matchers
28+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
29+
30+
- name: Install PHP 5/7 Dependencies
31+
uses: nick-invision/retry@v1
32+
with:
33+
timeout_minutes: 5
34+
max_attempts: 5
35+
command: composer update --no-interaction --no-progress
36+
if: "matrix.php < 8"
37+
38+
- name: Install PHP 8 Dependencies
39+
uses: nick-invision/retry@v1
40+
with:
41+
timeout_minutes: 5
42+
max_attempts: 5
43+
command: composer update --no-interaction --no-progress --ignore-platform-req=php
44+
if: "matrix.php >= 8"
45+
46+
- name: Execute PHPUnit
47+
run: vendor/bin/phpunit
48+
49+
tests_windows:
50+
name: PHP ${{ matrix.php }} Windows
51+
runs-on: windows-2019
52+
53+
strategy:
54+
matrix:
55+
php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
56+
57+
steps:
58+
- name: Configure Git
59+
run: |
60+
git config --global core.autocrlf false
61+
git config --global core.eol lf
62+
63+
- name: Checkout Code
64+
uses: actions/checkout@v2
65+
66+
- name: Setup PHP
67+
uses: shivammathur/setup-php@v2
68+
with:
69+
php-version: ${{ matrix.php }}
70+
tools: composer:v2
71+
coverage: none
72+
73+
- name: Setup Problem Matchers
74+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
75+
76+
- name: Install PHP 5/7 Dependencies
77+
uses: nick-invision/retry@v1
78+
with:
79+
timeout_minutes: 5
80+
max_attempts: 5
81+
command: composer update --no-interaction --no-progress
82+
if: "matrix.php < 8"
83+
84+
- name: Install PHP 8 Dependencies
85+
uses: nick-invision/retry@v1
86+
with:
87+
timeout_minutes: 5
88+
max_attempts: 5
89+
command: composer update --no-interaction --no-progress --ignore-platform-req=php
90+
if: "matrix.php >= 8"
91+
92+
- name: Execute PHPUnit
93+
run: vendor\bin\phpunit.bat

.travis.yml

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,18 @@
11
language: php
22

3+
dist: trusty
4+
35
matrix:
46
include:
5-
- php: 5.4
6-
dist: trusty
7-
- php: 5.5
8-
dist: trusty
9-
- php: 5.6
10-
dist: trusty
11-
- php: 7.0
12-
dist: trusty
13-
- php: 7.1
14-
dist: bionic
15-
- php: 7.2
16-
dist: bionic
17-
- php: 7.3
18-
dist: bionic
19-
- php: 7.4
20-
dist: bionic
217
- php: hhvm-3.18
22-
dist: trusty
8+
- php: hhvm-3.24
239

24-
install: travis_retry composer install
10+
before_install:
11+
- travis_retry composer self-update --2
12+
- travis_retry composer require "phpunit/phpunit:^4.8.36" --no-update --no-interaction
2513

26-
script: make test
14+
install:
15+
- travis_retry composer update --prefer-dist --no-interaction --no-progress
2716

28-
after_script:
29-
- make perf
30-
- JP_PHP_COMPILE=on make perf
31-
- JP_PHP_COMPILE=on CACHE=on make perf
17+
script:
18+
- vendor/bin/phpunit

0 commit comments

Comments
 (0)