Repository navigation
102 lines (85 loc) · 2.81 KB
/
Copy pathci.yml
File metadata and controls
102 lines (85 loc) · 2.81 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
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
name: ci
on:
pull_request:
push:
branches:
- "master"
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Both ends of the composer.json "php" constraint: the lowest version
# of each supported range, plus the newest release.
php-versions: ['7.4', '8.1', '8.5']
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
- name: Lint sources
run: ./bin/ci_php_lint
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['8.4']
magento: ['2.4.8']
coveralls: [ false ]
include:
- php-versions: '8.4'
magento: '2.4.9'
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.4.8
if: matrix.magento == '2.4.8'
run: composer update --with-dependencies magento/framework:103.0.8 laminas/laminas-code:4.17.0 roave/security-advisories symfony/yaml symfony/console madewithlove/license-checker
- name: Install Magento 2.4.9
if: matrix.magento == '2.4.9'
run: composer update --with-dependencies magento/framework:103.0.9 laminas/laminas-code:4.17.0 roave/security-advisories symfony/yaml symfony/console madewithlove/license-checker
- 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
run: composer analyze
- name: Static code analysis of the Magento stubs
run: composer analyze-stubs
- name: Autoloader smoke test
env:
REQUIRE_TURBO: '1'
run: composer smoke-test
- 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