-
-
Notifications
You must be signed in to change notification settings - Fork 35
63 lines (49 loc) · 1.29 KB
/
build.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
name: Build
on:
push:
pull_request:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
tests:
name: Tests
env:
extensions: pcov
strategy:
matrix:
include:
- php: '8.0'
- php: '8.1'
- php: '8.2'
- php: '8.3'
fail-fast: true
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: "none"
ini-values: date.timezone=Asia/Bangkok,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,zend.assertions=1
php-version: "${{ matrix.php }}"
extensions: "${{ env.extensions }}"
tools: flex
- name: Before run
run: |
echo COLUMNS=120 >> $GITHUB_ENV
for P in src tests; do find $P -type f -name '*.php' -exec php -l {} \;; done
- name: Install dependencies
run: composer install --no-progress --ansi -o
- name: Run tests
run: composer test:cov
- name: Codecov
run: bash <(curl -s https://codecov.io/bash)