-
Notifications
You must be signed in to change notification settings - Fork 176
84 lines (71 loc) · 2.88 KB
/
run-tests.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: "CI"
on:
pull_request:
push:
branches:
- 'master'
env:
fail-fast: true
PHPUNIT_FLAGS: "-v"
SYMFONY_REQUIRE: ">=4.4"
XDEBUG_MODE: "coverage"
jobs:
test:
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}
# TODO find a different setup for the JS testsuite as phantomjs is abandoned and is not available on newer runner images
runs-on: 'ubuntu-20.04'
continue-on-error: ${{ matrix.allowed-to-fail }}
strategy:
matrix:
php-version: ['7.2.5', '7.4', '8.0', '8.1']
variant: [normal]
dependencies: [highest]
allowed-to-fail: [true]
symfony-version: [latest]
include:
- php-version: '7.4'
dependencies: highest
variant: normal
allowed-to-fail: false
symfony-version: latest
- php-version: '8.0'
dependencies: highest
variant: normal
allowed-to-fail: false
symfony-version: latest
- php-version: '8.1'
dependencies: highest
variant: normal
allowed-to-fail: false
symfony-version: latest
steps:
- name: "Checkout code"
uses: actions/checkout@v2.3.3
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@2.7.0
with:
coverage: xdebug
php-version: ${{ matrix.php-version }}
tools: composer:v2
extensions: intl, xdebug
- name: "Set composer cache directory"
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Install variant
if: matrix.variant != 'normal'
run: composer require ${{ matrix.variant }} --no-update
- name: "Install Composer dependencies (${{ matrix.dependencies }})"
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist"
- name: "Install PHPUnit"
run: vendor/bin/simple-phpunit install
- name: "PHPUnit version"
run: vendor/bin/simple-phpunit --version
- name: "Run unit tests"
run: vendor/bin/phpunit --coverage-text --verbose
- name: "Run phantomjs tests"
run: phantomjs Resources/js/run-qunit.js file://`pwd`/Resources/js/index.html
- name: "Run phantomjs tests ES5"
run: phantomjs Resources/js/run-qunit.js file://`pwd`/Resources/js/index-with-es5-shim.html