-
Notifications
You must be signed in to change notification settings - Fork 33
57 lines (47 loc) · 1.82 KB
/
Copy pathtest.yml
File metadata and controls
57 lines (47 loc) · 1.82 KB
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.4'
- '8.5'
dependencies:
- 'locked'
- 'latest'
- 'lowest'
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
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@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
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