-
Notifications
You must be signed in to change notification settings - Fork 25
116 lines (95 loc) · 3.98 KB
/
ci.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: ci
on:
pull_request:
push:
branches:
- "master"
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.4']
magento: ['2.3.7-p2', '2.4.0', '2.4.1', '2.4.2', '2.4.2-p1', '2.4.2-p2', '2.4.3', '2.4.3-p1']
coveralls: [ false ]
include:
- php-versions: '8.1'
magento: '2.4.4'
operating-system: 'ubuntu-latest'
- php-versions: '8.1'
magento: '2.4.5'
operating-system: 'ubuntu-latest'
- php-versions: '8.1'
magento: '2.4.6'
operating-system: 'ubuntu-latest'
coveralls: true
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v2
coverage: xdebug
extensions: bcmath, gd
- name: Install Composer dependencies
run: composer install
- name: Install Magento 2.3.7-p2
if: matrix.magento == '2.3.7-p2'
run: composer update --with-dependencies magento/framework:102.0.7-p2 laminas/laminas-code:3.4.1
- name: Install Magento 2.4.0
if: matrix.magento == '2.4.0'
run: composer update --with-dependencies magento/framework:103.0.0 laminas/laminas-code:3.4.1
- name: Install Magento 2.4.1
if: matrix.magento == '2.4.1'
run: composer update --with-dependencies magento/framework:103.0.1 laminas/laminas-code:3.4.1
- name: Install Magento 2.4.2
if: matrix.magento == '2.4.2'
run: composer update --with-dependencies magento/framework:103.0.2 laminas/laminas-code:3.4.1
- name: Install Magento 2.4.2-p1
if: matrix.magento == '2.4.2-p1'
run: composer update --with-dependencies magento/framework:103.0.2-p1 laminas/laminas-code:3.4.1
- name: Install Magento 2.4.2-p2
if: matrix.magento == '2.4.2-p2'
run: composer update --with-dependencies magento/framework:103.0.2-p1 laminas/laminas-code:3.4.1
- name: Install Magento 2.4.3
if: matrix.magento == '2.4.3'
run: composer update --with-dependencies magento/framework:103.0.3 laminas/laminas-code:3.5.1
- name: Install Magento 2.4.3-p1
if: matrix.magento == '2.4.3-p1'
run: composer update --with-dependencies magento/framework:103.0.3-p1 laminas/laminas-code:3.5.1
- name: Install Magento 2.4.4
if: matrix.magento == '2.4.4'
run: composer update --with-dependencies magento/framework:103.0.4 laminas/laminas-code:4.5.1 symfony/yaml symfony/console
- name: Install Magento 2.4.5
if: matrix.magento == '2.4.5'
run: composer update --with-dependencies magento/framework:103.0.5 laminas/laminas-code:4.5.2 roave/security-advisories symfony/yaml symfony/console
- name: Install Magento 2.4.6
if: matrix.magento == '2.4.6'
run: composer update --with-dependencies magento/framework:103.0.6 laminas/laminas-code:4.10.0 roave/security-advisories symfony/yaml symfony/console
- name: Composer license check
run: composer check-license
- name: Codesniffer
run: composer cs-check
- name: Neon linting
run: |
./bin/ci_neon_lint
./bin/ci_markdown_neon_lint
- name: Static code analysis
if: (matrix.magento != '2.4.0' && matrix.magento != '2.4.1')
run: composer analyze
- name: Unittests
if: matrix.coveralls == false
run: composer test
- name: Unittests with coverage
if: matrix.coveralls == true
run: composer coverage
- name: Coveralls report
if: matrix.coveralls == true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer require php-coveralls/php-coveralls
./vendor/bin/php-coveralls --coverage_clover=clover.xml -v