-
-
Notifications
You must be signed in to change notification settings - Fork 242
44 lines (44 loc) · 1.19 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 2 * * *"
release:
types: [published]
jobs:
test:
runs-on: "ubuntu-22.04"
strategy:
matrix:
php: ["8.0", "8.1", "8.2", "8.3"]
coverage: ["none"]
include:
- php: "8.2"
coverage: "xdebug"
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
ini-file: development
php-version: ${{ matrix.php }}
coverage: ${{ matrix.coverage }}
# Tests don't run in PHP 8.0 due to pcntl_signal_dispatch being disabled ¯\_(ツ)_/¯
ini-values: disable_functions=""
- name: Composer install
uses: "ramsey/composer-install@v3"
with:
composer-options: "--optimize-autoloader"
- name: Run tests
if: matrix.coverage == 'none'
run: composer test
- name: Run coverage
if: matrix.coverage == 'xdebug'
run: composer coverage
- name: Upload coverage results to Coveralls
if: matrix.coverage == 'xdebug'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: composer coveralls