Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 45 additions & 32 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
name: run-tests

on: [push, pull_request]
on:
- push
- pull_request

jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [7.3, 7.4, 8.0, 8.1, 8.2]
laravel: [6.*, 7.*, 8.*, 9.*, 10.*]
laravel: ['6.*', '7.*', '8.*', '9.*', '10.*', '11.*']
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*
- laravel: 7.*
testbench: 5.*
- laravel: 6.*
testbench: 4.*
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*
- laravel: 7.*
testbench: 5.*
- laravel: 6.*
testbench: 4.*
- laravel: 11.*
testbench: 9.*
exclude:
- php: 7.3
laravel: 9.*
Expand Down Expand Up @@ -52,31 +57,39 @@ jobs:
- php: 8.2
laravel: 8.*
dependency-version: prefer-lowest
- laravel: 11.*
php: 7.3
- laravel: 11.*
php: 7.4
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Install dependencies
run: |
composer require "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Install dependencies
run: |
composer require "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest

- name: Execute tests
run: vendor/bin/phpunit
- name: Execute tests
run: vendor/bin/phpunit
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"name": "beyondcode/slack-notification-channel",
"description": "Slack Notification Channel for Laravel using API tokens.",
"keywords": ["laravel", "notifications", "slack"],
"keywords": [
"laravel",
"notifications",
"slack"
],
"license": "MIT",
"authors": [
{
Expand All @@ -12,7 +16,7 @@
"require": {
"php": "^7.3.0|^8.0|^8.1",
"guzzlehttp/guzzle": "^6.0|^7.0",
"illuminate/notifications": "^6.0|^7.0|^8.0|^9.0|^10.0"
"illuminate/notifications": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0"
},
"require-dev": {
"mockery/mockery": "^1.3",
Expand Down