-
Notifications
You must be signed in to change notification settings - Fork 28
51 lines (41 loc) · 1.46 KB
/
Build-Test.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
name: Tests
on:
push:
branches:
- '*.x'
pull_request:
jobs:
tests:
if: "! contains(toJSON(github.event.commits.*.msg), 'skip') && ! contains(toJSON(github.event.commits.*.msg), 'ci')" #skip ci...
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04]
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
include:
- operating-system: ubuntu-20.04
php-versions: '7.4'
COMPOSER_FLAGS: '--prefer-stable --prefer-lowest'
PHPUNIT_FLAGS: '--coverage-clover build/coverage.xml'
name: PHP ${{ matrix.php-versions }} - ${{ matrix.operating-system }}
env:
extensions: curl json libxml dom
key: cache-v1 # can be any string, change to clear the extension cache.
steps:
# Checks out a copy of your repository on the ubuntu machine
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
coverage: xdebug
tools: 'composer:v2, pecl'
- name: Install Composer dependencies
run: composer update ${{ matrix.COMPOSER_FLAGS }} --no-interaction
- name: boot test server
run: vendor/bin/http_test_server > /dev/null 2>&1 &
- name: Run tests
run: composer test