-
-
Notifications
You must be signed in to change notification settings - Fork 40
181 lines (143 loc) · 4.87 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
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
env:
TZ: UTC
PHP_VERSION: 7.3
NODE_VERSION: 12.x
jobs:
php:
runs-on: ubuntu-latest
name: php / ${{ matrix.test.name }}
strategy:
fail-fast: false
matrix:
test:
- name: Lint Symfony's templates files
script: bin/console lint:twig templates/
- name: Lint Symfony's config files
script: bin/console lint:yaml config/ --parse-tags
- name: Lint Symfony's translations files
script: bin/console lint:xliff translations
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
extensions: ctype, iconv, intl
ini-values: date.timezone=${{ env.TZ }}, memory_limit=-1, session.gc_probability=0, opcache.enable=1, opcache.enable_cli=1, opcache.memory_consumption=256, opcache.max_accelerated_files=20000, opcache.validate_timestamps=0, realpath_cache_size=4096K, realpath_cache_ttl=600
- name: Install Composer 1.x
run: composer self-update --1
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: $(composer config cache-files-dir)
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Update dependencies
run: composer update --no-progress --prefer-dist --optimize-autoloader
- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Tests
run: "${{ matrix.test.script }}"
javascript:
runs-on: ubuntu-latest
name: javascript / ${{ matrix.test.name }}
strategy:
fail-fast: false
matrix:
test:
- name: Building for development
script: yarn dev
- name: Building for production
script: yarn build
steps:
- name: Install Node.js
uses: actions/setup-node@v2-beta
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/checkout@v2
- name: Cache node_modules
uses: actions/cache@v2
with:
path: $(yarn cache dir)
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-modules-
- run: yarn install --frozen-lockfile
- name: Tests
run: "${{ matrix.test.script }}"name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
env:
TZ: UTC
PHP_VERSION: 7.3
NODE_VERSION: 12.x
jobs:
php:
runs-on: ubuntu-latest
name: php / ${{ matrix.test.name }}
strategy:
fail-fast: false
matrix:
test:
- name: Lint Symfony's templates files
script: bin/console lint:twig templates/
- name: Lint Symfony's config files
script: bin/console lint:yaml config/ --parse-tags
- name: Lint Symfony's translations files
script: bin/console lint:xliff translations
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
extensions: ctype, iconv, intl
ini-values: date.timezone=${{ env.TZ }}, memory_limit=-1, session.gc_probability=0, opcache.enable=1, opcache.enable_cli=1, opcache.memory_consumption=256, opcache.max_accelerated_files=20000, opcache.validate_timestamps=0, realpath_cache_size=4096K, realpath_cache_ttl=600
- name: Install Composer 1.x
run: composer self-update --1
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: $(composer config cache-files-dir)
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Update dependencies
run: composer update --no-progress --prefer-dist --optimize-autoloader
- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Tests
run: "${{ matrix.test.script }}"
javascript:
runs-on: ubuntu-latest
name: javascript / ${{ matrix.test.name }}
strategy:
fail-fast: false
matrix:
test:
- name: Building for development
script: yarn dev
- name: Building for production
script: yarn build
steps:
- name: Install Node.js
uses: actions/setup-node@v2-beta
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/checkout@v2
- name: Cache node_modules
uses: actions/cache@v2
with:
path: $(yarn cache dir)
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-modules-
- run: yarn install --frozen-lockfile
- name: Tests
run: "${{ matrix.test.script }}"