-
Notifications
You must be signed in to change notification settings - Fork 29
95 lines (84 loc) · 2.69 KB
/
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
85
86
87
88
89
90
91
92
93
94
95
name: Tests
on:
pull_request:
push:
# trying and staging branches are for BORS config
branches:
- trying
- staging
- main
jobs:
integration-tests:
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
# Will still run for each push to bump-meilisearch-v*
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2']
include:
- php-version: '7.4'
sf-version: '4.4.*'
- php-version: '7.4'
sf-version: '5.4.*'
- php-version: '8.0'
sf-version: '6.0.*'
- php-version: '8.1'
sf-version: '6.0.*'
- php-version: '8.1'
sf-version: '6.1.*'
- php-version: '8.2'
sf-version: '6.2.*'
name: integration-tests (PHP ${{ matrix.php-version }}) (Symfony ${{ matrix.sf-version }})
steps:
- uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2, flex
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
env:
SYMFONY_REQUIRE: ${{ matrix.sf-version }}
run: composer install --prefer-dist --no-progress --quiet
- name: "Remove doctrine/annotations"
if: matrix.php-version != '7.4'
run: |
composer remove --dev doctrine/annotations
- name: Meilisearch setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics
- name: Run test suite
run: composer test:unit
code-style:
runs-on: ubuntu-latest
name: 'Code style'
steps:
- uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress --quiet
- name: PHP CS Fixer
run: composer lint:check
- name: PHP MD
run: composer phpmd
continue-on-error: true
- name: PHPstan
run: |
vendor/bin/simple-phpunit --version
composer phpstan
yaml-lint:
name: Yaml linting check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Yaml lint check
uses: ibiqlik/action-yamllint@v3
with:
config_file: .yamllint.yml