Skip to content

Commit 88bce71

Browse files
committed
Added Github Workflow for Lint YAML
1 parent 8087159 commit 88bce71

File tree

259 files changed

+12110
-12076
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+12110
-12076
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ indent_size = 4
1919
trim_trailing_whitespace = false
2020

2121
[*.yml]
22-
indent_size = 4
22+
indent_size = 2

.github/workflows/cron_js_routing.yml

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Cron Update JS Routing
22
on:
3-
schedule:
4-
- cron: '0 23 * * *'
3+
schedule:
4+
- cron: '0 23 * * *'
55
jobs:
66
js-routing-dump:
77
runs-on: ubuntu-latest
@@ -67,22 +67,22 @@ jobs:
6767
- name: Create Pull Request
6868
uses: peter-evans/create-pull-request@v3
6969
with:
70-
token: ${{ secrets.GITHUB_TOKEN }}
71-
commit-message: Updated JS Routing file
72-
committer: PrestonBot <[email protected]>
73-
author: prestonBot <[email protected]>
74-
title: 'Updated JS Routing file'
75-
body: |
76-
| Questions | Answers
77-
| ----------------- | -------------------------------------------------------
78-
| Branch? | develop
79-
| Description? | Updated JS Routing file
80-
| Type? | improvement
81-
| Category? | CO
82-
| BC breaks? | no
83-
| Deprecations? | no
84-
| Fixed ticket? | N/A
85-
| How to test? | N/A
86-
| Possible impacts? | N/A
87-
base: 'develop'
88-
delete-branch: true
70+
token: ${{ secrets.GITHUB_TOKEN }}
71+
commit-message: Updated JS Routing file
72+
committer: PrestonBot <[email protected]>
73+
author: prestonBot <[email protected]>
74+
title: 'Updated JS Routing file'
75+
body: |
76+
| Questions | Answers
77+
| ----------------- | -------------------------------------------------------
78+
| Branch? | develop
79+
| Description? | Updated JS Routing file
80+
| Type? | improvement
81+
| Category? | CO
82+
| BC breaks? | no
83+
| Deprecations? | no
84+
| Fixed ticket? | N/A
85+
| How to test? | N/A
86+
| Possible impacts? | N/A
87+
base: 'develop'
88+
delete-branch: true

.github/workflows/cron_nightly.yml

+35-35
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Nightly
22

33
on:
44
schedule:
5-
- cron: '0 1 * * *'
5+
- cron: '0 1 * * *'
66
# Allows maintainers to trigger nightly manually
77
# workflow_dispatch:
88

@@ -28,46 +28,46 @@ jobs:
2828
NIGHTLY_TOKEN: ${{ secrets.NIGHTLY_TOKEN }}
2929

3030
steps:
31-
- uses: actions/checkout@v2
32-
with:
33-
fetch-depth: 0
34-
ref: ${{ env.GH_BRANCH }}
31+
- uses: actions/checkout@v2
32+
with:
33+
fetch-depth: 0
34+
ref: ${{ env.GH_BRANCH }}
3535

36-
- name: Setup PHP
37-
uses: shivammathur/setup-php@v1
38-
with:
39-
php-version: '7.3'
40-
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v1
38+
with:
39+
php-version: '7.3'
40+
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
4141

42-
- name: Initialize GCloud Service Key
43-
run: echo $GC_SERVICE_KEY > $HOME/gcloud-service-key.json
42+
- name: Initialize GCloud Service Key
43+
run: echo $GC_SERVICE_KEY > $HOME/gcloud-service-key.json
4444

45-
- uses: google-github-actions/setup-gcloud@master
46-
with:
47-
service_account_key: ${{ env.GC_SERVICE_KEY }}
48-
project_id: ${{ env.GC_PROJECT_ID }}
45+
- uses: google-github-actions/setup-gcloud@master
46+
with:
47+
service_account_key: ${{ env.GC_SERVICE_KEY }}
48+
project_id: ${{ env.GC_PROJECT_ID }}
4949

50-
- name: Create directory
51-
run: mkdir -p /tmp/ps-release
50+
- name: Create directory
51+
run: mkdir -p /tmp/ps-release
5252

53-
- name: Create build
54-
run: php tools/build/CreateRelease.php --destination-dir=/tmp/ps-release
53+
- name: Create build
54+
run: php tools/build/CreateRelease.php --destination-dir=/tmp/ps-release
5555

56-
- name: Rename file
57-
run: cd /tmp/ps-release
58-
&& today=`date +%Y-%m-%d-`; for i in *; do mv $i $today$GH_BRANCH-$i; done
59-
&& cd -
56+
- name: Rename file
57+
run: cd /tmp/ps-release
58+
&& today=`date +%Y-%m-%d-`; for i in *; do mv $i $today$GH_BRANCH-$i; done
59+
&& cd -
6060

61-
- name: Upload to Google Cloud Storage (GCS)
62-
run: gsutil cp -r "/tmp/ps-release/**" gs://prestashop-core-nightly
61+
- name: Upload to Google Cloud Storage (GCS)
62+
run: gsutil cp -r "/tmp/ps-release/**" gs://prestashop-core-nightly
6363

64-
- name: Stop the instance if started
65-
run: gcloud compute instances stop --zone $GC_ZONE "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}"
64+
- name: Stop the instance if started
65+
run: gcloud compute instances stop --zone $GC_ZONE "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}"
6666

67-
- name: Add metadata & Start instance
68-
run: |
69-
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata=NIGHTLY_TOKEN=$NIGHTLY_TOKEN && \
70-
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata=GH_BRANCH=$GH_BRANCH && \
71-
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata-from-file startup-tests-script=tests/UI/scripts/run-nightly-tests.sh && \
72-
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata-from-file startup-reports-script=tests/UI/scripts/run-nightly-reports.sh && \
73-
gcloud compute instances start --zone $GC_ZONE "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}"
67+
- name: Add metadata & Start instance
68+
run: |
69+
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata=NIGHTLY_TOKEN=$NIGHTLY_TOKEN && \
70+
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata=GH_BRANCH=$GH_BRANCH && \
71+
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata-from-file startup-tests-script=tests/UI/scripts/run-nightly-tests.sh && \
72+
gcloud compute instances add-metadata "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}" --zone $GC_ZONE --metadata-from-file startup-reports-script=tests/UI/scripts/run-nightly-reports.sh && \
73+
gcloud compute instances start --zone $GC_ZONE "${GC_INSTANCE_NAME}-${INSTANCE_TYPE}"

.github/workflows/integration.yml

+62-62
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
11
name: Integration tests
2-
on: [push, pull_request]
2+
on: [ push, pull_request ]
33
jobs:
4-
integration:
5-
name: Integration tests
6-
runs-on: ubuntu-latest
7-
strategy:
8-
matrix:
9-
php: ['7.2', '7.3', '7.4', '8.0']
10-
fail-fast: false
11-
steps:
12-
- name: Cancel Previous Runs
13-
uses: styfle/[email protected]
14-
with:
15-
access_token: ${{ github.token }}
4+
integration:
5+
name: Integration tests
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
php: [ '7.2', '7.3', '7.4', '8.0' ]
10+
fail-fast: false
11+
steps:
12+
- name: Cancel Previous Runs
13+
uses: styfle/[email protected]
14+
with:
15+
access_token: ${{ github.token }}
1616

17-
- name: Setup PHP
18-
uses: shivammathur/setup-php@v2
19-
with:
20-
php-version: ${{ matrix.php }}
21-
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
22-
- name: Setup MySQL
23-
uses: mirromutth/[email protected]
24-
with:
25-
mysql version: '8.0'
26-
mysql database: 'prestashop'
27-
mysql root password: 'password'
28-
- name: Setup Node
29-
uses: actions/setup-node@v2
30-
with:
31-
node-version: '14'
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: ${{ matrix.php }}
21+
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
22+
- name: Setup MySQL
23+
uses: mirromutth/[email protected]
24+
with:
25+
mysql version: '8.0'
26+
mysql database: 'prestashop'
27+
mysql root password: 'password'
28+
- name: Setup Node
29+
uses: actions/setup-node@v2
30+
with:
31+
node-version: '14'
3232

33-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v2
3434

35-
- name: PrestaShop Configuration
36-
run: cp .github/workflows/phpunit/parameters.yml app/config/parameters.yml
35+
- name: PrestaShop Configuration
36+
run: cp .github/workflows/phpunit/parameters.yml app/config/parameters.yml
3737

38-
- name: Get Composer Cache Directory
39-
id: composer-cache
40-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
38+
- name: Get Composer Cache Directory
39+
id: composer-cache
40+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
4141

42-
- name: Cache Node Directory
43-
uses: actions/cache@v2
44-
with:
45-
path: ~/.npm
46-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
47-
restore-keys: ${{ runner.os }}-node-
42+
- name: Cache Node Directory
43+
uses: actions/cache@v2
44+
with:
45+
path: ~/.npm
46+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
47+
restore-keys: ${{ runner.os }}-node-
4848

49-
- name: Cache Composer Directory
50-
uses: actions/cache@v2
51-
with:
52-
path: ${{ steps.composer-cache.outputs.dir }}
53-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
54-
restore-keys: ${{ runner.os }}-composer-
49+
- name: Cache Composer Directory
50+
uses: actions/cache@v2
51+
with:
52+
path: ${{ steps.composer-cache.outputs.dir }}
53+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
54+
restore-keys: ${{ runner.os }}-composer-
5555

56-
- name: Composer Install
57-
run: composer install --ansi --prefer-dist --no-interaction --no-progress
56+
- name: Composer Install
57+
run: composer install --ansi --prefer-dist --no-interaction --no-progress
5858

59-
- name: Build assets
60-
run: make assets
59+
- name: Build assets
60+
run: make assets
6161

62-
- name: Change MySQL authentication method
63-
run: mysql -h127.0.0.1 -uroot -ppassword -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; FLUSH PRIVILEGES;"
62+
- name: Change MySQL authentication method
63+
run: mysql -h127.0.0.1 -uroot -ppassword -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; FLUSH PRIVILEGES;"
6464

65-
- name: Prepare PrestaShop parameters
66-
run: cp .github/workflows/phpunit/parameters.php app/config/parameters.php
65+
- name: Prepare PrestaShop parameters
66+
run: cp .github/workflows/phpunit/parameters.php app/config/parameters.php
6767

68-
- name: Run integration-tests
69-
run: composer run-script integration-tests --timeout=0
70-
env:
71-
SYMFONY_DEPRECATIONS_HELPER: disabled
68+
- name: Run integration-tests
69+
run: composer run-script integration-tests --timeout=0
70+
env:
71+
SYMFONY_DEPRECATIONS_HELPER: disabled
7272

73-
- name: Run integration-behaviour-tests
74-
run: composer run-script integration-behaviour-tests --timeout=0
75-
env:
76-
SYMFONY_DEPRECATIONS_HELPER: disabled
73+
- name: Run integration-behaviour-tests
74+
run: composer run-script integration-behaviour-tests --timeout=0
75+
env:
76+
SYMFONY_DEPRECATIONS_HELPER: disabled

.github/workflows/js.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Js
2-
on: [push, pull_request]
2+
on: [ push, pull_request ]
33
jobs:
44
js-unit-tests:
55
runs-on: ubuntu-latest
66
name: Run unit tests
77
strategy:
88
matrix:
9-
js: ['12', '13', '14', '15']
9+
js: [ '12', '13', '14', '15' ]
1010
steps:
1111
- name: Setup Node
1212
uses: actions/setup-node@v2

0 commit comments

Comments
 (0)