This repository was archived by the owner on Jan 18, 2022. It is now read-only.
forked from akeneo/PhpSpecSkipExampleExtension
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.36 KB
/
run-tests.yml
File metadata and controls
48 lines (40 loc) · 1.36 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
name: 'Run Tests'
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [7.4, 8.0, 8.1]
phpspec: [7.0.*, 7.1.*]
composer-flags: ['--prefer-stable']
include:
- php: 7.4
phpspec: 7.0.*
composer-flags: '--prefer-stable --prefer-lowest'
exclude:
- php: 8.1
phpspec: 7.0.*
name: "PHP ${{ matrix.php }} - phpspec ${{ matrix.phpspec }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-phpspec-${{ matrix.phpspec }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}-flags-${{ matrix.composer-flags }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
extensions: curl
coverage: none
- name: Install dependencies
run: |
composer require "phpspec/phpspec:${{ matrix.phpspec }}" --no-update
composer update ${{ matrix.composer-flags }}
- name: Run specs
run: vendor/bin/phpspec run