-
Notifications
You must be signed in to change notification settings - Fork 2
114 lines (91 loc) · 3.04 KB
/
tests.yaml
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
name: Tests
on:
workflow_dispatch: ~
push:
branches:
- main
pull_request:
jobs:
tests:
name: 'Tests'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Setup node'
uses: actions/setup-node@v2
with:
node-version: '16'
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
coverage: "none"
ini-values: "memory_limit=-1"
php-version: "8.1"
tools: symfony
- name: 'Determine composer cache directory'
id: composer-cache
run: echo "::set-output name=directory::$(composer config cache-dir)"
- name: 'Cache composer dependencies'
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: composer-${{ hashFiles('composer.lock') }}
- name: 'Cache resized images'
uses: actions/cache@v2
with:
path: public/resized
key: resized-images-tests-${{ secrets.CACHE_VERSION }}
- name: 'Install dependencies'
id: deps
run: |
echo "::group::composer install"
composer install --no-progress --ansi
echo "::endgroup::"
# echo "::group::install phpunit"
# vendor/bin/simple-phpunit install
# echo "::endgroup::"
echo "::group::npm install"
npm install --color=always --no-progress --no-audit
echo "::endgroup::"
echo "::group::importmap install"
symfony console importmap:install --ansi
echo "::endgroup::"
- name: 'Warmup'
run: |
bin/console cache:clear --ansi --no-warmup
bin/console cache:warmup --ansi
env:
APP_ENV: test
- name: 'Composer validate'
if: always() && steps.deps.outcome == 'success'
run: composer validate --no-check-publish
- name: 'Lint YAML'
if: always() && steps.deps.outcome == 'success'
run: make lint.yaml@integration
- name: 'Lint Twig'
if: always() && steps.deps.outcome == 'success'
run: make lint.yaml@integration
- name: 'Lint JS'
if: always() && steps.deps.outcome == 'success'
run: make lint.eslint@integration
- name: 'Lint Parameters and Services'
if: always() && steps.deps.outcome == 'success'
run: make lint.container@integration
- name: 'PHP CS Fixer'
if: always() && steps.deps.outcome == 'success'
run: make lint.php-cs-fixer@integration
- name: 'PhpStan'
if: always() && steps.deps.outcome == 'success'
run: make lint.phpstan@integration
# - name: Run tests
# run: vendor/bin/simple-phpunit --testdox
- name: 'Check build static'
run: |
bin/console sass:build --ansi
bin/console asset-map:compile --ansi
bin/console stenope:build --no-interaction -vvv --ansi
env:
APP_ENV: prod
NODE_ENV: production