Skip to content

fix(autoreview): Fix PHPUnit test detection (#3280) #2377

fix(autoreview): Fix PHPUnit test detection (#3280)

fix(autoreview): Fix PHPUnit test detection (#3280) #2377

Workflow file for this run

# yamllint disable rule:line-length
# yamllint disable rule:braces
name: Benchmarks
on:
pull_request:
push:
branches:
- main
- master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 30
name: 'Tests'
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
with:
php-version: '8.4'
tools: composer
coverage: none
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=100M
- name: Install dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
- name: Run tests
shell: bash
run: make test-benchmark
benchmarks:
runs-on: ubuntu-latest
timeout-minutes: 30
name: 'Benchmarks'
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
with:
php-version: '8.4'
tools: composer
coverage: none
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=100M
- name: Install dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
- name: Run benchmarks
shell: bash
run: make benchmark
# This is a meta job to avoid to have to constantly change the protection rules
# whenever we touch the matrix.
tests-status:
name: Benchmarks Status
runs-on: ubuntu-latest
timeout-minutes: 30
needs:
- tests
- benchmarks
if: always()
steps:
- name: Successful run
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failing run
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1