-
-
Notifications
You must be signed in to change notification settings - Fork 445
52 lines (43 loc) · 1.7 KB
/
Copy pathbenchmark_phpunit.yaml
File metadata and controls
52 lines (43 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Benchmark PHPUnit
# A/B wall-time benchmark: serial phpunit vs the fast-unit parallel runner.
# Scheduled only (not on pull requests); runs every 2 hours on ubuntu.
# Reminder: cron fires only from the default branch, so this starts running
# once the file is on `main`.
on:
schedule:
- cron: '0 */2 * * *'
workflow_dispatch: null
env:
COMPOSER_ROOT_VERSION: "dev-main"
jobs:
benchmark:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php-versions: ['8.4', '8.5']
runs-on: ${{ matrix.os }}
timeout-minutes: 15
name: benchmark (${{ matrix.os }})
steps:
- uses: actions/checkout@v5
-
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
ini-values: zend.assertions=1
- uses: "ramsey/composer-install@v4"
- name: Serial phpunit
shell: bash
run: |
printf '| platform | php | mode | wall time |\n| --- | --- | --- | --- |\n' >> "$GITHUB_STEP_SUMMARY"
start=$SECONDS
vendor/bin/phpunit
echo "| ${{ matrix.os }} | ${{ matrix.php-versions }} | serial | $((SECONDS - start))s |" >> "$GITHUB_STEP_SUMMARY"
- name: fast-unit runner
shell: bash
run: |
start=$SECONDS
vendor/bin/fastunit
echo "| ${{ matrix.os }} | ${{ matrix.php-versions }} | fast-unit | $((SECONDS - start))s |" >> "$GITHUB_STEP_SUMMARY"