This repository was archived by the owner on Nov 2, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 271
70 lines (54 loc) · 2.08 KB
/
ci.yml
File metadata and controls
70 lines (54 loc) · 2.08 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
58
59
60
61
62
63
64
65
66
67
68
69
70
name: "CI"
on:
pull_request:
push:
branches:
- 'master'
env:
fail-fast: true
jobs:
test:
name: "PHP ${{ matrix.php-version }} + DEPS=${{ matrix.deps }}"
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allow-failures }}
strategy:
matrix:
php-version:
- '7.1.3'
- '7.2'
deps: [no]
allow-failures: [false]
include:
- php-version: '7.1.3'
deps: 'low'
allow-failures: false
steps:
- name: "Checkout code"
uses: actions/checkout@v2.3.3
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@2.7.0
with:
coverage: "none"
php-version: ${{ matrix.php-version }}
tools: composer:v2
- name: "Add PHPUnit matcher"
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: "Set composer cache directory"
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: "Cache composer"
uses: actions/cache@v2.1.2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}-deps-${{ matrix.deps }}-allow-failures-${{ matrix.allow-failures }}
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer-
- if: matrix.deps == 'low'
run: composer --prefer-lowest --prefer-stable update
- if: matrix.deps == 'no'
run: composer update
- name: "Install PHPUnit"
run: vendor/bin/simple-phpunit install
- name: "PHPUnit version"
run: vendor/bin/simple-phpunit --version
- name: "Run tests"
run: vendor/bin/simple-phpunit