-
-
Notifications
You must be signed in to change notification settings - Fork 162
126 lines (108 loc) · 3.89 KB
/
static.yml
File metadata and controls
126 lines (108 loc) · 3.89 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Static Tests (Lint, Stan)
on:
push:
branches: [ '5.0', 'next' ]
paths:
- 'features/**'
- 'behat.yml.dist'
- 'src/**'
- '*.php'
- '*.neon'
- '*.xml'
- 'composer.json'
- '.github/workflows/static.yml'
pull_request:
branches: [ '5.0', 'next' ]
paths:
- 'features/**'
- 'behat.yml.dist'
- 'src/**'
- '*.php'
- '*.neon'
- '*.xml'
- 'composer.json'
- '.github/workflows/static.yml'
release:
types: [ created ]
schedule:
- cron: "0 1 * * 1"
permissions:
contents: read
env:
APP_ENV: "test"
PIMCORE_TEST_DB_DSN: "mysql://root:root@127.0.0.1:3306/coreshop_test"
PIMCORE_SECRET: "${{ secrets.PIMCORE_SECRET }}"
PIMCORE_INSTALL_ENCRYPTION_SECRET: "${{ secrets.PIMCORE_SECRET }}"
PIMCORE_INSTANCE_IDENTIFIER: "${{ secrets.PIMCORE_INSTANCE_IDENTIFIER }}"
PIMCORE_INSTALL_INSTANCE_IDENTIFIER: "${{ secrets.PIMCORE_INSTANCE_IDENTIFIER }}"
PIMCORE_INSTALL_PRODUCT_KEY: "${{ secrets.PIMCORE_PRODUCT_KEY }}"
PIMCORE_PRODUCT_KEY: "${{ secrets.PIMCORE_PRODUCT_KEY }}"
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.3, 8.4 ]
pimcore: [ ^12.3 ]
dependencies: [ highest, lowest ]
services:
database:
image: "mysql:8"
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: coreshop_test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, Deps ${{ matrix.dependencies }}"
steps:
- name: Checkout PR head (only for pull_request_target)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Checkout PR head (for push or other events)
if: github.event_name != 'pull_request_target'
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767
extensions: intl, gd, simpleXML, dom, exif, fileinfo, iconv, mbstring, mysqli, pdo_mysql, zip, zlib
- name: Validate composer.json and composer.lock
run: composer validate
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: pimcore/pimcore
run: composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
- if: matrix.dependencies == 'highest'
name: Install dependencies highest
run: composer update --no-progress --prefer-dist --optimize-autoloader
- if: matrix.dependencies == 'lowest'
name: Install dependencies lowest
run: composer update --no-progress --prefer-dist --optimize-autoloader --prefer-lowest
- name: Validate YAML
run: bin/console lint:yaml src
- name: Validate TWIG
run: bin/console lint:twig src
- name: Validate Container
run: bin/console lint:container
- name: Validate Doctrine Settings
run: bin/console doctrine:schema:validate --skip-sync
- name: STAN
run: |
cp -f config/packages/stan/config.yaml config/packages/dev/config.yaml
bin/console cache:clear --env=dev
vendor/bin/phpstan
- name: PSALM
run: |
vendor/bin/psalm