-
Notifications
You must be signed in to change notification settings - Fork 180
75 lines (63 loc) · 2.21 KB
/
Copy pathrun-tests.yml
File metadata and controls
75 lines (63 loc) · 2.21 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
71
72
73
74
75
name: 'Run Tests'
on: [push, pull_request]
jobs:
test:
runs-on: 'ubuntu-22.04'
continue-on-error: ${{ matrix.can-fail }}
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4']
symfony: ['6.4.*', '7.2.*', '7.3.*', '7.4.*', '8.0.*']
composer-flags: ['--prefer-stable']
can-fail: [false]
extensions: ['curl, iconv, mbstring, mongodb, pdo, pdo_sqlite, sqlite, zip']
exclude:
- php: '8.2'
symfony: '8.0.*'
- php: '8.3'
symfony: '8.0.*'
include:
- php: '8.2'
symfony: '6.4.*'
composer-flags: '--prefer-stable --prefer-lowest'
can-fail: false
extensions: 'curl, iconv, mbstring, mongodb, pdo, pdo_sqlite, sqlite, zip'
name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-symfony-${{ matrix.symfony }}-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, flex
extensions: ${{ matrix.extensions }}
coverage: none
- name: Setup MongoDB
id: setup-mongodb
uses: mongodb-labs/drivers-evergreen-tools@master
with:
version: '6.0'
topology: server
- name: Install dependencies
run: composer update ${{ matrix.composer-flags }} --prefer-dist
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
- name: Run PHPUnit
run: bin/phpunit
env:
DOCTRINE_MONGODB_SERVER: ${{ steps.setup-mongodb.outputs.cluster-uri }}
lint:
runs-on: 'ubuntu-22.04'
name: 'Markdown Linting'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run markdownlint
uses: articulate/actions-markdownlint@v1