-
Notifications
You must be signed in to change notification settings - Fork 32
57 lines (47 loc) · 1.69 KB
/
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
52
53
54
55
56
57
name: Test
on: [ push, pull_request ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- '8.1'
- '8.2'
dependencies:
- 'locked'
- 'latest'
- 'lowest'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP, with composer and extensions
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
# TODO: Remove next lint to enable memcached after that issue is fixed: https://github.com/php-memcached-dev/php-memcached/issues/477
extensions: :memcached
coverage: none
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ~/.cache/composer
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies (locked)
if: ${{ matrix.dependencies == 'locked' }}
run: composer install --no-interaction
- name: Install dependencies (latest)
if: ${{ matrix.dependencies == 'latest' }}
run: composer update --no-interaction
- name: Install dependencies (lowest)
if: ${{ matrix.dependencies == 'lowest' }}
run: composer update --prefer-lowest --no-interaction
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Test with PHPUnit
run: make unit
- name: Test examples
run: make check-example