Skip to content

Commit

Permalink
Merge a2742bc into 1700096
Browse files Browse the repository at this point in the history
  • Loading branch information
bkrukowski committed Jul 25, 2022
2 parents 1700096 + a2742bc commit f5d1115
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/.github export-ignore
/bin export-ignore
/dev-tools export-ignore
/tests export-ignore
/.coveralls.yml export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs.dist export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
70 changes: 70 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: 'Tests'
on:
push:
tags:
- v*
branches:
- '**'
pull_request:

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-20.04']
# php-versions: ['5.3', '5.4', '5.5', '5.6', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.1', '7.2', '7.3', '7.4']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v2

- name: Setup composer.json
uses: php-actions/composer@v6
with:
command: config platform.php ${{ matrix.php-versions }}.99
php_version: 8.1
version: 1

- name: Install dependencies
uses: php-actions/composer@v6
with:
php_version: 8.1
version: 1

- name: Setup dev-tools/composer.json
if: startsWith(matrix.php-versions, '5.6') || startsWith(matrix.php-versions, '7.') || startsWith(matrix.php-versions, '8.')
uses: php-actions/composer@v6
with:
command: config platform.php ${{ matrix.php-versions }}.99
php_version: 8.1
version: 1

- name: Install dev-tools
if: startsWith(matrix.php-versions, '5.6') || startsWith(matrix.php-versions, '7.') || startsWith(matrix.php-versions, '8.')
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-versions }}
args: --working-dir=dev-tools
version: 1

- name: Tests
run: sudo vendor/bin/phpunit-4.8-fixer && vendor/bin/phpunit

- name: Coding Standards Fixer
if: startsWith(matrix.php-versions, '5.6') || startsWith(matrix.php-versions, '7.') || startsWith(matrix.php-versions, '8.')
run: ./dev-tools/vendor/bin/php-cs-fixer --diff --dry-run -v --allow-risky=yes fix && ./dev-tools/vendor/bin/php-cs-fixer --diff --dry-run -v --allow-risky=yes fix .php_cs.dist

- name: Coverage
if: startsWith(matrix.php-versions, '5.6') || startsWith(matrix.php-versions, '7.') || startsWith(matrix.php-versions, '8.')
run: bin/coveralls.sh
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58 changes: 0 additions & 58 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2019-2020 Bartłomiej Krukowski
Copyright (c) 2019-2022 Bartłomiej Krukowski

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": ["golang", "defer"],
"type": "library",
"require": {
"php": ">=5.3"
"php": "^5.3 || ^7.0 || ^8.0"
},
"require-dev": {
"awesomite/phpunit-4.8-fixer": "^1.0",
Expand Down
3 changes: 2 additions & 1 deletion dev-tools/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"require": {
"php-coveralls/php-coveralls": "^1.1 || ^2.1"
"friendsofphp/php-cs-fixer": "2.16.1",
"php-coveralls/php-coveralls": "^2.5"
}
}

0 comments on commit f5d1115

Please sign in to comment.