-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from clearbooks/php81-compatibility
Some changes towards PHP 8.1 compatibility
- Loading branch information
Showing
10 changed files
with
1,192 additions
and
627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.