Skip to content

Commit

Permalink
Merge pull request #18 from clearbooks/php81-compatibility
Browse files Browse the repository at this point in the history
Some changes towards PHP 8.1 compatibility
  • Loading branch information
peter-horvath authored Jan 18, 2022
2 parents ddd31b0 + 1a724c3 commit 890f806
Show file tree
Hide file tree
Showing 10 changed files with 1,192 additions and 627 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Tests

on: [push, pull_request]

jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1']
steps:
- name: Checkout
uses: actions/checkout@v2

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

- name: Setup MySQL
uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: '5.6'

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-versions }}-
- name: Install dependencies
run: composer install -o --no-progress

- name: Set up database
run: |
cp config/db-config.sample.php config/db-config.php
mysql -uroot -h127.0.0.1 -e 'CREATE DATABASE labs;'
cat vendor/clearbooks/labs-schema/sql/*.sql | mysql -uroot -h127.0.0.1 labs
- name: Run tests
run: ./vendor/bin/phpunit -c phpunit.xml
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
"psr-4": {"Clearbooks\\Labs\\": ["src/", "test/"]}
},
"require":{
"php": ">=7.2",
"php": ">=7.4",
"clearbooks/labs-schema": "^1.1.2",
"clearbooks/labs-php-client": "^2.0.0",
"crodas/notoj": "^1.7.0",
"doctrine/dbal": "~2.10.4",
"doctrine/dbal": "^3.2.0",
"php-di/php-di": "^6.0.5"
},
"require-dev": {
"phpunit/phpunit": "^8"
"phpunit/phpunit": "^9.5"
},
"repositories": [
{
Expand Down
Loading

0 comments on commit 890f806

Please sign in to comment.