-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (60 loc) · 2.55 KB
/
tests.yaml
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
name: "Tests"
on:
pull_request:
push:
branches:
- main
env:
fail-fast: true
PHPUNIT_FLAGS: "-v"
SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit"
SYMFONY_REQUIRE: ">=4.4"
# 40x: Since symfony/monolog-bridge 5.2:
# Passing an actionLevel (int|string) as constructor's 3rd argument of
# "Symfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategy"
# is deprecated, "Monolog\Handler\FingersCrossed\ActivationStrategyInterface" expected.
SYMFONY_DEPRECATIONS_HELPER: 40
jobs:
test:
name: "${{ matrix.operating-system }} / PHP ${{ matrix.php-version }}"
runs-on: ${{ matrix.operating-system }}
continue-on-error: false
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-version: ['7.3', '7.4', '8.0']
include:
- operating-system: 'macos-latest'
php-version: '8.0'
- operating-system: 'windows-latest'
php-version: '8.0'
steps:
- name: "Checkout code"
uses: actions/[email protected]
- name: "Install PHP with extensions"
uses: shivammathur/[email protected]
with:
coverage: "none"
extensions: "intl, mbstring, pdo_sqlite"
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/[email protected]
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer-
- name: "Require symfony/flex"
run: composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main
- 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 ${{ env.PHPUNIT_FLAGS }}