Skip to content

Commit

Permalink
Merge pull request #15 from Mane-Olawale/improved-tests
Browse files Browse the repository at this point in the history
chore: improved tests and dependencies
  • Loading branch information
Mane-Olawale authored Jul 10, 2022
2 parents c5d552e + e60ea26 commit 1f85dbc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
32 changes: 20 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@ on:
pull_request:
push:
branches:
- master
- main

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php:
- "7.3"
- "7.4"
- "8.0"
dependency-version:
# - prefer-lowest
- prefer-stable
php: [7.3, 7.4, '8.0', 8.1]
laravel: [6, 7, 8, 9]
exclude:
- php: 7.3
laravel: 9
- php: 7.4
laravel: 9
- php: 8.1
laravel: 6
- php: 8.1
laravel: 7

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} tests
steps:
# basically git clone
- uses: actions/checkout@v2
Expand All @@ -32,14 +37,17 @@ jobs:
git --version
- name: Setup PHP
# use PHP of specific version
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip
coverage: none # disable xdebug, pcov
tools: composer
ini-values: error_reporting=E_ALL
tools: composer:v2

- name: Install Composer Dependencies
run: |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
composer require "illuminate/contracts=^${{ matrix.laravel }}" --no-update
composer update --prefer-dist --no-interaction --no-progress
- name: Run PHPUnit Tests
run: composer test
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"require": {
"php": "^7.2|^8.0",
"mane-olawale/termii": "^1.2",
"illuminate/notifications": "^6.0|^7.0|^8.0",
"illuminate/support": "^6.0|^7.0|^8.0"
"illuminate/notifications": "^6.0|^7.0|^8.0|^9.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0"
},
"require-dev": {
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0",
Expand Down

0 comments on commit 1f85dbc

Please sign in to comment.