-
Notifications
You must be signed in to change notification settings - Fork 10
65 lines (59 loc) · 1.61 KB
/
main.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@2.31.1
with:
php-version: '8.3'
tools: cs2pr, phpcs
- name: Run phpcs
run: phpcs -q --report=checkstyle src/ tests/ | cs2pr
benchmark:
runs-on: ubuntu-24.04
strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@2.31.1
with:
php-version: ${{ matrix.php-versions }}
tools: composer, phpbench/phpbench
coverage: none
ini-values: memory_limit=-1
- name: Install dependencies
run: composer install
- name: PHPBench
run: phpbench run -q --report=aggregate --
unit-tests:
runs-on: ubuntu-24.04
strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@2.31.1
with:
php-version: ${{ matrix.php-versions }}
tools: composer, phpunit
- name: Install dependencies
run: composer install
- name: PHPUnit
run: phpunit --coverage-clover coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
flags: unittests