forked from PrestaShop/PrestaShop
-
Notifications
You must be signed in to change notification settings - Fork 1
126 lines (110 loc) · 4.14 KB
/
cron_js_routing.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
name: Cron Update JS Routing
on:
schedule:
- cron: '0 23 * * *'
workflow_dispatch:
permissions: { }
jobs:
js-routing-dump:
permissions:
contents: write # to create branch (peter-evans/create-pull-request)
pull-requests: write # to create a PR (peter-evans/create-pull-request)
runs-on: ubuntu-latest
name: Update JS Routing
strategy:
fail-fast: false
matrix:
BRANCH:
- develop
- 9.0.x
- 8.2.x
- 8.1.x
- 8.0.x
include:
- BRANCH: develop
node: 20
- BRANCH: 9.0.x
node: 20
- BRANCH: 8.2.x
node: 16
env:
PHP_VERSION: '7.4'
NODE_VERSION: ${{ matrix.node }}
GH_BRANCH: ${{ matrix.BRANCH }}
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv, simplexml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup MySQL
uses: mirromutth/[email protected]
with:
mysql version: '5.7'
mysql database: 'prestashop'
mysql root password: 'password'
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ env.GH_BRANCH }}
- name: PrestaShop Configuration
run: cp .github/workflows/phpunit/parameters.yml app/config/parameters.yml
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Node Directory
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache Composer Directory
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Composer dependencies
run: COMPOSER_PROCESS_TIMEOUT=600 composer install --ansi --prefer-dist --no-interaction --no-progress
- name: Build assets
run: make assets
- name: Install PrestaShop
# yamllint disable-line rule:line-length
run: php install-dev/index_cli.php --language=en --country=fr --domain=localhost --db_server=127.0.0.1 --db_password=password --db_name=prestashop --db_create=1 --name=prestashop.unit.test [email protected] --password=prestashop_demo
- name: Dump JS Routing file
# yamllint disable-line rule:line-length
run: php bin/console fos:js-routing:dump --format=json --target=admin-dev/themes/new-theme/js/fos_js_routes.json
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: cron-js-routing
add-paths: |
admin-dev/themes/new-theme/js/fos_js_routes.json
commit-message: Updated JS Routing file
committer: PrestonBot <[email protected]>
author: prestonBot <[email protected]>
title: 'Updated JS Routing file'
body: |
| Questions | Answers
| ----------------- | -------------------------------------------------------
| Branch? | ${{ env.GH_BRANCH }}
| Description? | Updated JS Routing file
| Type? | improvement
| Category? | CO
| BC breaks? | no
| Deprecations? | no
| Fixed ticket? | N/A
| How to test? | N/A
| Possible impacts? | N/A
base: ${{ env.GH_BRANCH }}
delete-branch: true