Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 8 support #64

Merged
merged 3 commits into from
Sep 11, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Added full installation of Scout agent into a Laravel app and verific…
…ation of basic functionality
  • Loading branch information
asgrim committed Sep 11, 2020
commit 2972870c3067a938f1b5435c4cf7a1dc80bff7fd
63 changes: 61 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 @@ -24,8 +81,10 @@ jobs:
- "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