-
Notifications
You must be signed in to change notification settings - Fork 154
92 lines (73 loc) · 2.29 KB
/
php.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
name: CI
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
php:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
dependencies:
- "lowest"
- "highest"
name: Tests with PHP ${{ matrix.php-version }} and ${{ matrix.dependencies }} dependencies
steps:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
ini-file: development
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: npm install
- name: Validate composer
run: composer validate
- name: Composer install
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "${{ matrix.composer-options }}"
- name: Run unit tests suite
run: vendor/bin/phpunit
- name: Run code style suite
run: vendor/bin/phpcs --standard=Magento2 Magento2/Helpers Magento2/Sniffs Magento2/Rector Magento2Framework/Sniffs
- name: Run framework suite
run: vendor/bin/phpcs --standard=Magento2Framework Magento2/Helpers Magento2/Sniffs Magento2/Rector Magento2Framework/Sniffs
js:
runs-on: ubuntu-latest
name: Javascript tests
steps:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
- uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Run ESLint
run: npm run eslint -- eslint/rules
rector:
runs-on: ubuntu-latest
name: Rector tests
steps:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
- uses: actions/checkout@v2
- name: Install dependencies
run: composer install
- name: Run rector
run: vendor/bin/rector process Magento2 Magento2Framework PHP_CodeSniffer --dry-run --autoload-file vendor/squizlabs/php_codesniffer/autoload.php --autoload-file vendor/magento/php-compatibility-fork/PHPCSAliases.php