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

on:
push:
branches:
- master
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
tools: composer:v2

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

- name: Run phpcs
run: vendor/bin/phpcs -p --warning-severity=0 src/ tests/

test:
name: PHP ${{ matrix.php }} (${{ matrix.dependencies }} deps)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
dependencies: ['highest', 'lowest']
steps:
- uses: actions/checkout@v6

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

- name: Install dependencies (highest)
if: matrix.dependencies == 'highest'
run: composer update --no-interaction --no-progress --prefer-dist

- name: Install dependencies (lowest)
if: matrix.dependencies == 'lowest'
run: composer update --no-interaction --no-progress --prefer-dist --prefer-lowest

- name: Run unit tests
run: vendor/bin/phpunit --testsuite unit
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL = /bin/sh

DOCKER = $(shell which docker)
PHP_VER := 7.2
PHP_VER := 8.2
IMAGE := graze/php-alpine:${PHP_VER}-test
VOLUME := /srv
DOCKER_RUN_BASE := ${DOCKER} run --rm -t -v $$(pwd):${VOLUME} -w ${VOLUME}
Expand Down Expand Up @@ -58,10 +58,10 @@ test-matrix-lowest: ## Test all version, with the lowest version
${MAKE} build-update

test-matrix: ## Run the unit tests against multiple targets.
${MAKE} PHP_VER="5.6" build-update test
${MAKE} PHP_VER="7.0" build-update test
${MAKE} PHP_VER="7.1" build-update test
${MAKE} PHP_VER="7.2" build-update test
${MAKE} PHP_VER="7.4" build-update test
${MAKE} PHP_VER="8.0" build-update test
${MAKE} PHP_VER="8.1" build-update test
${MAKE} PHP_VER="8.2" build-update test

test-coverage: ## Run all tests and output coverage to the console.
${DOCKER_RUN} phpdbg7 -qrr vendor/bin/phpunit --coverage-text
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Latest Version on Packagist](https://img.shields.io/packagist/v/graze/config-validation.svg?style=flat-square)](https://packagist.org/packages/graze/config-validation)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/graze/config-validation/master.svg?style=flat-square)](https://travis-ci.org/graze/config-validation)
[![CI](https://github.com/graze/config-validation/actions/workflows/ci.yml/badge.svg)](https://github.com/graze/config-validation/actions/workflows/ci.yml)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/graze/config-validation.svg?style=flat-square)](https://scrutinizer-ci.com/g/graze/config-validation/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/graze/config-validation.svg?style=flat-square)](https://scrutinizer-ci.com/g/graze/config-validation)
[![Total Downloads](https://img.shields.io/packagist/dt/graze/config-validation.svg?style=flat-square)](https://packagist.org/packages/graze/config-validation)
Expand Down
15 changes: 9 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"license": "MIT",
"config": {
"platform": {
"php": "7.2"
"php": "7.4"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"authors": [
Expand All @@ -26,13 +29,13 @@
}
],
"require": {
"php": "^5.6 | ^7.0",
"respect/validation": "^1.1"
"php": "^7.4 | ^8.0",
"respect/validation": "^2.2"
},
"require-dev": {
"graze/standards": "^2.0",
"phpunit/phpunit": "^5.7.21 | ^6 | ^7",
"squizlabs/php_codesniffer": "^3.0"
"graze/standards": "^3.0",
"phpunit/phpunit": "^9.0",
"squizlabs/php_codesniffer": "^4.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading
Loading