Skip to content
Merged
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
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
push:
branches: [master]
pull_request:

jobs:
test:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3', '8.4']

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
tools: composer:v2

- name: Get Composer cache dir
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Cache Composer packages
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-

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

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

- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover=coverage.clover

- name: Upload coverage to Codecov
if: matrix.php == '8.3'
uses: codecov/codecov-action@v4
with:
files: coverage.clover
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Upload coverage to Scrutinizer
if: matrix.php == '8.3'
continue-on-error: true
run: |
wget -q https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ composer.lock
*~
\#*#
.\#*
vendor/*
vendor/*
.phpunit.result.cache
.phpunit.cache/
27 changes: 27 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
build:
environment:
php: 8.3

nodes:
analysis:
tests:
override:
- php-scrutinizer-run
- phpcs-run

checks:
php:
code_rating: true
duplication: true

tools:
external_code_coverage:
timeout: 900
runs: 1

filter:
paths:
- src/*
excluded_paths:
- tests/*
- vendor/*
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Inflect
=======

[![CI](https://github.com/mmucklo/inflect/actions/workflows/ci.yml/badge.svg)](https://github.com/mmucklo/inflect/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/mmucklo/inflect/branch/master/graph/badge.svg)](https://codecov.io/gh/mmucklo/inflect)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mmucklo/inflect/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mmucklo/inflect/?branch=master)

Inflect is an Inflector for PHP

Installation:
Expand Down
11 changes: 0 additions & 11 deletions autoload.php.dist

This file was deleted.

34 changes: 19 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,29 @@
"license": "MIT",
"keywords": ["singularize", "pluralize", "inflect", "inflector", "urlify"],
"authors": [
{
"name": "Matthew J. Mucklo",
"email": "mmucklo@gmail.com"
},
{
"name": "Sho Kuwamoto",
"email": "sho@kuwamoto.org"
{
"name": "Matthew J. Mucklo",
"email": "mmucklo@gmail.com"
},
{
"name": "Sho Kuwamoto",
"email": "sho@kuwamoto.org"
}
],
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"require": {
"php": ">=5.3.17"
"php": ">=8.1"
},
"require-dev": {
"phpunit/phpunit": "^10.5"
},
"autoload": {
"psr-0": {
"Inflect": "src/"
}
"psr-4": {
"Inflect\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Inflect\\Tests\\": "tests/"
}
}
}

40 changes: 0 additions & 40 deletions phpunit.xml-dist

This file was deleted.

19 changes: 19 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
failOnWarning="true"
failOnNotice="true">
<testsuites>
<testsuite name="Inflect Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>

<source>
<include>
<directory>src</directory>
</include>
</source>
</phpunit>
File renamed without changes.
Loading
Loading