Repository navigation
54 lines (44 loc) · 1.41 KB
/
Copy pathslim.yml
File metadata and controls
54 lines (44 loc) · 1.41 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
name: slim
on:
workflow_call:
inputs:
php-versions:
required: true
type: string
jobs:
test:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php: ${{ fromJson(format('[{0}]', inputs.php-versions)) }}
slim: [ '4.0' ]
dependencies: [ 'lowest', 'highest' ]
name: PHP ${{ matrix.php }} / Slim ${{ matrix.slim }} on ${{ matrix.operating-system }} with ${{ matrix.dependencies }} dependencies
steps:
- uses: actions/checkout@v7
name: Checkout repository
- name: Cache dependencies
uses: actions/cache@v6
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
- name: Install framework deps
run: |
composer require slim/slim "^${{ matrix.slim }}"
- name: Composer install
uses: ramsey/composer-install@v4
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: ${{ matrix.composer-options }}
- name: Refresh fixture specs
run: composer refresh-specs
- name: PHPUnit + Code coverage
run: |
vendor/bin/phpunit