2020-02-28 15:42:17 +05:30
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# GitHub Action for Blackfire Player
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								name: Play a Blackfire Scenario
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								on: [push, pull_request]
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								jobs:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  blackfire-player:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    name: Blackfire (PHP ${{ matrix.php-versions }})
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    # 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 }}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    runs-on: ${{ matrix.operating-system }}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    strategy:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      fail-fast: false
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      matrix:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        operating-system: [ubuntu-latest, windows-latest, macos-latest]
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-15 16:49:10 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        php-versions: ['7.4', '8.0', '8.1']
							 | 
						
					
						
							
								
									
										
										
										
											2020-02-28 15:42:17 +05:30
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        # blackfire-player supports PHP >= 5.5
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    steps:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      - name: Checkout
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-12 11:05:16 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        uses: actions/checkout@v5
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-15 16:49:10 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      # Docs: https://github.com/shivammathur/setup-php
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      - name: Setup PHP
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        uses: shivammathur/setup-php@v2
							 | 
						
					
						
							
								
									
										
										
										
											2020-02-28 15:42:17 +05:30
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        with:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          php-version: ${{ matrix.php-versions }}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          extensions: blackfire
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-15 16:49:10 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          # Setup Blackfire CLI and player
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          tools: blackfire, blackfire-player
							 | 
						
					
						
							
								
									
										
										
										
											2020-02-28 15:42:17 +05:30
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          coverage: none
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-15 16:49:10 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      # Refer to https://blackfire.io/docs/player/index#usage
							 | 
						
					
						
							
								
									
										
										
										
											2020-02-28 15:42:17 +05:30
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      - name: Play the scenario
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-15 16:49:10 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        run: blackfire-player run scenario.bkf
							 |