Skip to content

Commit

Permalink
Merge pull request #64 from scoutapp/laravel-8-support
Browse files Browse the repository at this point in the history
Laravel 8 support
  • Loading branch information
asgrim authored Sep 11, 2020
2 parents d9ac074 + 2972870 commit 4c42bb0
Show file tree
Hide file tree
Showing 3 changed files with 202 additions and 73 deletions.
64 changes: 62 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,63 @@ on:
branches: [ master ]

jobs:
integration:
name: "Integration"
runs-on: ubuntu-latest
strategy:
matrix:
extensions: ["scoutapm", ""]
laravel-version:
- "5.5.*"
- "6.*"
- "7.*"
- "8.*"
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
exclude:
- {php-version: "7.1", laravel-version: "6.*"} # Laravel 6 requires 7.2+
- {php-version: "7.1", laravel-version: "7.*"} # Laravel 7 requires 7.2+
- {php-version: "7.1", laravel-version: "8.*"} # Laravel 8 requires 7.3+
- {php-version: "7.2", laravel-version: "8.*"} # Laravel 8 requires 7.3+
env:
SCOUT_APM_KEY: ${{ secrets.SCOUT_APM_KEY }}
steps:
- uses: actions/checkout@v2
with:
path: scout-apm-laravel
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: pecl
extensions: ${{ matrix.extensions }}
- name: "Install Laravel quickstart project"
run: "composer create-project laravel/laravel:${{ matrix.laravel-version}} test-app --prefer-dist"
- name: "Add scout-apm-laravel as a repository"
run: cd test-app && composer config repositories.scout path ../scout-apm-laravel
- name: "Require scout-apm-laravel current checkout"
run: cd test-app && composer require scoutapp/scout-apm-laravel:*@dev
- name: "Publish the provider"
run: cd test-app && php artisan vendor:publish --provider="Scoutapm\Laravel\Providers\ScoutApmServiceProvider"
- name: "Configure Scout"
run: cd test-app && echo -e "\nSCOUT_KEY=\"\${SCOUT_APM_KEY}\"\nSCOUT_NAME=\"My Laravel App\"\nSCOUT_MONITOR=true" >> .env
- name: "Load the index page to trigger instrumentation"
run: |
cd test-app
cat .env
php artisan serve &
sleep 2
wget http://localhost:8000
- name: "Check logs for successful payload send"
run: |
cd test-app
cat storage/logs/laravel.log
grep -q "local.DEBUG: \[Scout\] Sent whole payload successfully to core agent." storage/logs/laravel.log
tests:
name: "Run tests"
runs-on: ubuntu-latest
Expand All @@ -17,14 +74,17 @@ jobs:
- "5.5.*"
- "6.*"
- "7.*"
- "8.*"
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
exclude:
- {php-version: "7.1", laravel-version: "6.*"}
- {php-version: "7.1", laravel-version: "7.*"}
- { php-version: "7.1", laravel-version: "6.*" } # Laravel 6 requires 7.2+
- { php-version: "7.1", laravel-version: "7.*" } # Laravel 7 requires 7.2+
- { php-version: "7.1", laravel-version: "8.*" } # Laravel 8 requires 7.3+
- { php-version: "7.2", laravel-version: "8.*" } # Laravel 8 requires 7.3+
steps:
- uses: actions/checkout@v2
- name: "Install PHP"
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
],
"require": {
"php": ">=7.1.0,<7.5.0",
"illuminate/contracts": "^5.5.0|^6.0|^7.0",
"illuminate/http": "^5.5.0|^6.0|^7.0",
"illuminate/routing": "^5.5.0|^6.0|^7.0",
"illuminate/support": "^5.5.0|^6.0|^7.0",
"illuminate/view": "^5.5.0|^6.0|^7.0",
"illuminate/contracts": "^5.5.0|^6.0|^7.0|^8.0",
"illuminate/http": "^5.5.0|^6.0|^7.0|^8.0",
"illuminate/routing": "^5.5.0|^6.0|^7.0|^8.0",
"illuminate/support": "^5.5.0|^6.0|^7.0|^8.0",
"illuminate/view": "^5.5.0|^6.0|^7.0|^8.0",
"psr/log": "^1.0",
"ramsey/uuid": "^3.0|^4.0",
"scoutapp/scout-apm-php": "^5.0"
},
"require-dev": {
"doctrine/coding-standard": "^6.0",
"laravel/framework": "^5.5.0|^6.0|^7.0",
"laravel/framework": "^5.5.0|^6.0|^7.0|^8.0",
"mockery/mockery": "^1.2|^1.3",
"phpunit/phpunit": "^7.5.15|^8.4",
"roave/security-advisories": "dev-master",
Expand Down
Loading

0 comments on commit 4c42bb0

Please sign in to comment.