-
Notifications
You must be signed in to change notification settings - Fork 19
154 lines (124 loc) · 4.96 KB
/
main.yaml
File metadata and controls
154 lines (124 loc) · 4.96 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: "Main"
on: # yamllint disable-line rule:truthy
pull_request: null
push:
branches:
- "main"
env:
DEFAULT_PHP_VERSION: "8.2"
RUN_ENVIRONMENT: "local"
jobs:
tests:
name : Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- '8.2'
- '8.3'
- '8.4'
- '8.5'
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: "Install PHP"
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
with:
coverage: "none"
php-version: "${{ matrix.php }}"
extensions: 'inotify, pcntl'
- 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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: php-${{ matrix.php }}-composer-
- name: "Install dependencies with Composer"
run: composer install --no-interaction --no-progress --prefer-dist
- name: "Run unit tests"
run: "make test-unit ENV=${{ env.RUN_ENVIRONMENT }}"
- name: "Run integration tests"
run: "make test-integration ENV=${{ env.RUN_ENVIRONMENT }}"
quality:
name: Quality
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: "Install PHP"
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
with:
coverage: "none"
php-version: "${{ env.DEFAULT_PHP_VERSION }}"
extensions: 'inotify, pcntl'
- 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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-${{ env.DEFAULT_PHP_VERSION }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: php-${{ env.DEFAULT_PHP_VERSION }}-composer-
- name: "Install dependencies with Composer"
run: composer install --no-interaction --no-progress --prefer-dist
- name: "Check for normalized composer.json"
run: "composer normalize --dry-run"
- name: "CGL"
run: "make code-style ENV=${{ env.RUN_ENVIRONMENT }}"
- name: "PHPSTAN"
run: "make phpstan ENV=${{ env.RUN_ENVIRONMENT }}"
- name: "Lint guides.xml configurations"
run: "make test-xml ENV=${{ env.RUN_ENVIRONMENT }}"
- name: "'Documentation' renders without warning'"
run: "make test-docs ENV=${{ env.RUN_ENVIRONMENT }}"
- name: "'Documentation-rendertest' renders without warning'"
run: "make test-rendertest ENV=${{ env.RUN_ENVIRONMENT }}"
theme-js-tests:
name: "typo3-docs-theme JS tests"
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/typo3-docs-theme
steps:
- name: "Checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: "Install Node"
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: packages/typo3-docs-theme/.nvmrc
cache: npm
cache-dependency-path: packages/typo3-docs-theme/package-lock.json
- name: "Install npm dependencies"
run: npm ci --no-progress
- name: "Run JS unit tests"
run: npm test
monorepo-validate:
name: "Validate monorepo structure"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: "Install PHP"
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
with:
coverage: "none"
php-version: "${{ env.DEFAULT_PHP_VERSION }}"
extensions: 'inotify, pcntl'
- 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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-${{ env.DEFAULT_PHP_VERSION }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: php-${{ env.DEFAULT_PHP_VERSION }}-composer-
- name: "Install dependencies with Composer"
run: composer install --no-interaction --no-progress --prefer-dist
- name: "Validate monorepo"
run: "make test-monorepo ENV=${{ env.RUN_ENVIRONMENT }}"