Skip to content
This repository was archived by the owner on Jul 8, 2023. It is now read-only.

Support PHP 8.x #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.gitattributes export-ignore
.gitignore export-ignore
.travis.* export-ignore
/scripts/ export-ignore
/test/ export-ignore
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Continuous Integration

on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
steps:
- uses: actions/checkout@v3

- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: none
ini-values: assert.exception=1, zend.assertions=1

- name: Validate composer.json
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
/test/bin/php-cs-fixer
/vendor/
/.php_cs.cache
.phpunit.result.cache
composer.lock
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Current build status image][build-image]][current build status]
[![Current coverage status image][coverage-image]][current coverage status]

[build-image]: http://img.shields.io/travis/eloquent/enumeration/master.svg?style=flat-square "Current build status for the master branch"
[build-image]: https://img.shields.io/github/actions/workflow/status/eloquent/enumeration/ci.yml?branch=master&style=flat-square
[coverage-image]: https://img.shields.io/codecov/c/github/eloquent/enumeration/master.svg?style=flat-square "Current test coverage for the master branch"
[current build status]: https://travis-ci.org/eloquent/enumeration
[current coverage status]: https://codecov.io/github/eloquent/enumeration
Expand Down
9 changes: 2 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
}
],
"require": {
"php": ">=7.1"
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^7"
"phpunit/phpunit": "^9.6"
},
"autoload": {
"psr-4": {
Expand All @@ -24,10 +24,5 @@
},
"autoload-dev": {
"classmap": ["test/src"]
},
"config": {
"platform": {
"php": "7.1.99"
}
}
}
Loading