Skip to content

Commit

Permalink
Improve testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Aug 16, 2021
1 parent 090ca3c commit 7a45e8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/ci.yml
Expand Up @@ -12,14 +12,14 @@ jobs:
database: [mysql, sqlite]
release: [stable, lowest]
include:
- php: 7.4
- php: 8.0
database: mysql
release: stable
coverage: xdebug

services:
mysql:
image: mysql:latest
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test
Expand All @@ -29,6 +29,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: actions/cache@v2
with:
path: ~/.cache/composer/files
Expand All @@ -38,10 +40,6 @@ jobs:
php-version: ${{ matrix.php }}
extensions: bcmath, ctype, json, mbstring, openssl, pdo, pdo_${{ matrix.database }}, tokenizer, xml
coverage: ${{ matrix.coverage }}
- run: |
mysql -h 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -u root -ppassword -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password'"
mysql -h 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -u root -ppassword -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'"
if: matrix.database == 'mysql' && matrix.php < 7.4
- run: composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-${{ matrix.release }}
- run: cp tests/config/database.ci.php tests/config/database.php
- run: |
Expand All @@ -50,7 +48,5 @@ jobs:
env:
DATABASE: ${{ matrix.database }}
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
- run: |
wget -q https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.xml
- run: vendor/bin/ocular code-coverage:upload --format=php-clover coverage.xml
if: matrix.coverage == 'xdebug'
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -13,6 +13,7 @@
"illuminate/database": "^8.0"
},
"require-dev": {
"scrutinizer/ocular": "^1.8",
"illuminate/pagination": "^8.0",
"laravel/homestead": "^11.0|^12.0",
"phpunit/phpunit": "^9.3",
Expand Down

0 comments on commit 7a45e8c

Please sign in to comment.