setup-php/examples/blackfire.yml

32 lines
1.3 KiB
YAML
Raw Normal View History

2020-02-28 17:12:17 +07:00
# GitHub Action for Blackfire
2020-02-27 16:57:09 +07:00
name: Profiling with blackfire
on: [push, pull_request]
jobs:
2020-02-28 17:12:17 +07:00
blackfire:
2020-02-27 16:57:09 +07:00
name: Blackfire (PHP ${{ matrix.php-versions }})
2020-02-28 17:12:17 +07:00
# Add your Blackfire credentials securely using GitHub Secrets
env:
BLACKFIRE_SERVER_ID: ${{ secrets.BLACKFIRE_SERVER_ID }}
BLACKFIRE_SERVER_TOKEN: ${{ secrets.BLACKFIRE_SERVER_TOKEN }}
BLACKFIRE_CLIENT_ID: ${{ secrets.BLACKFIRE_CLIENT_ID }}
BLACKFIRE_CLIENT_TOKEN: ${{ secrets.BLACKFIRE_CLIENT_TOKEN }}
2020-02-27 16:57:09 +07:00
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
2020-02-28 17:12:17 +07:00
php-versions: ['7.2', '7.3', '7.4']
# Blackfire supports PHP >= 5.3 on ubuntu and macos and PHP >= 5.4 on windows
2020-02-27 16:57:09 +07:00
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
2020-02-28 17:12:17 +07:00
extensions: blackfire
tools: blackfire #Setup Blackfire client and agent
coverage: none
2020-02-27 16:57:09 +07:00
- name: Profile
2020-02-28 17:12:17 +07:00
run: blackfire run php my-script.php # Refer to https://blackfire.io/docs/cookbooks/profiling-cli