Skip to content

Commit 6f0f08a

Browse files
authored
Merge pull request PrestaShop#92 from PrestaShop/dev
Release 2.7.1
2 parents db94516 + 8564066 commit 6f0f08a

File tree

10 files changed

+158
-194
lines changed

10 files changed

+158
-194
lines changed

.github/workflows/build-release.yml

Lines changed: 3 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,6 @@ name: Build
22
on: [push, pull_request]
33

44
jobs:
5-
deploy:
6-
name: build dependencies & create artifact
7-
runs-on: ubuntu-latest
8-
steps:
9-
- name: Checkout
10-
uses: actions/[email protected]
11-
- name: Install composer dependencies
12-
run: composer install --no-dev -o
13-
- name: Clean-up project
14-
uses: PrestaShopCorp/[email protected]
15-
- name: Prepare auto-index tool
16-
run: composer global require prestashop/autoindex
17-
- name: Generate index.php
18-
run: ~/.composer/vendor/bin/autoindex
19-
- name: Create & upload artifact
20-
uses: actions/upload-artifact@v1
21-
with:
22-
name: ${{ github.event.repository.name }}
23-
path: ../
24-
update_release_draft:
25-
runs-on: ubuntu-latest
26-
needs: [deploy]
27-
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
28-
steps:
29-
- name: Download artifact
30-
uses: actions/download-artifact@v1
31-
with:
32-
name: ${{ github.event.repository.name }}
33-
- id: release_info
34-
uses: toolmantim/release-drafter@v5
35-
env:
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
- name: Prepare for Release
38-
run: |
39-
cd ${{ github.event.repository.name }}
40-
zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}
41-
- name: Clean existing assets
42-
shell: bash
43-
run: |
44-
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
45-
assets=`bin/hub api -t repos/${{ github.repository }}/releases/${{ steps.release_info.outputs.id }}/assets | awk '/\].url/ { print $2 }'`
46-
for asset in $assets
47-
do
48-
bin/hub api -X DELETE $asset
49-
done
50-
env:
51-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
- name: Publish to GitHub Release
53-
uses: actions/[email protected]
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
with:
57-
upload_url: ${{ steps.release_info.outputs.upload_url }}
58-
asset_path: ./${{ github.event.repository.name }}/${{ github.event.repository.name }}.zip
59-
asset_name: ${{ github.event.repository.name }}.zip
60-
asset_content_type: application/zip
5+
build-and-release-draft:
6+
name: Build & Release draft
7+
uses: PrestaShop/.github/.github/workflows/build-release.yml@master

.github/workflows/php.yml

Lines changed: 86 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,89 @@
11
name: PHP tests
22
on: [push, pull_request]
33
jobs:
4-
# Check there is no syntax errors in the project
5-
php-linter:
6-
name: PHP Syntax check
7-
runs-on: ubuntu-latest
8-
steps:
9-
- name: Checkout
10-
uses: actions/[email protected]
11-
12-
- name: PHP syntax checker 5.6
13-
uses: prestashop/github-action-php-lint/5.6@master
14-
15-
- name: PHP syntax checker 7.2
16-
uses: prestashop/github-action-php-lint/7.2@master
17-
18-
- name: PHP syntax checker 7.3
19-
uses: prestashop/github-action-php-lint/7.3@master
20-
21-
- name: PHP syntax checker 7.4
22-
uses: prestashop/github-action-php-lint/7.4@master
23-
24-
# Check the PHP code follow the coding standards
25-
php-cs-fixer:
26-
name: PHP-CS-Fixer
27-
runs-on: ubuntu-latest
28-
steps:
29-
- name: Setup PHP
30-
uses: shivammathur/setup-php@v2
31-
with:
32-
php-version: '7.4'
33-
34-
- name: Checkout
35-
uses: actions/[email protected]
36-
37-
- name: Cache dependencies
38-
uses: actions/cache@v2
39-
with:
40-
path: vendor
41-
key: php-${{ hashFiles('composer.lock') }}
42-
43-
- name: Install dependencies
44-
run: composer install
45-
46-
- name: Run PHP-CS-Fixer
47-
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no --diff-format udiff
48-
49-
# Run PHPStan against the module and a PrestaShop release
50-
phpstan:
51-
name: PHPStan
52-
runs-on: ubuntu-latest
53-
strategy:
54-
matrix:
55-
presta-versions: ['1.7.1.2', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6.9', '1.7.7.3', 'latest']
56-
steps:
57-
- name: Setup PHP
58-
uses: shivammathur/setup-php@v2
59-
with:
60-
php-version: '7.4'
61-
62-
- name: Checkout
63-
uses: actions/[email protected]
64-
65-
# Add vendor folder in cache to make next builds faster
66-
- name: Cache vendor folder
67-
uses: actions/cache@v1
68-
with:
69-
path: vendor
70-
key: php-${{ hashFiles('composer.lock') }}
71-
72-
# Add composer local folder in cache to make next builds faster
73-
- name: Cache composer folder
74-
uses: actions/cache@v1
75-
with:
76-
path: ~/.composer/cache
77-
key: php-composer-cache
78-
79-
- run: composer install
80-
81-
# Docker images prestashop/prestashop may be used, even if the shop remains uninstalled
82-
- name: Execute PHPStan on PrestaShop (Tag ${{ matrix.presta-versions }})
83-
run: ./tests/phpstan.sh ${{ matrix.presta-versions }}
4+
# Check there is no syntax errors in the project
5+
php-linter:
6+
name: PHP Syntax check 5.6 => 8.1
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/[email protected]
11+
12+
- name: PHP syntax checker 5.6
13+
uses: prestashop/github-action-php-lint/5.6@master
14+
15+
- name: PHP syntax checker 7.2
16+
uses: prestashop/github-action-php-lint/7.2@master
17+
18+
- name: PHP syntax checker 7.3
19+
uses: prestashop/github-action-php-lint/7.3@master
20+
21+
- name: PHP syntax checker 7.4
22+
uses: prestashop/github-action-php-lint/7.4@master
23+
24+
- name: PHP syntax checker 8.0
25+
uses: prestashop/github-action-php-lint/8.0@master
26+
27+
- name: PHP syntax checker 8.1
28+
uses: prestashop/github-action-php-lint/8.1@master
29+
30+
# Check the PHP code follow the coding standards
31+
php-cs-fixer:
32+
name: PHP-CS-Fixer
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: '7.4'
39+
40+
- name: Checkout
41+
uses: actions/[email protected]
42+
43+
- name: Cache dependencies
44+
uses: actions/cache@v2
45+
with:
46+
path: vendor
47+
key: php-${{ hashFiles('composer.lock') }}
48+
49+
- name: Install dependencies
50+
run: composer install
51+
52+
- name: Run PHP-CS-Fixer
53+
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no --diff-format udiff
54+
55+
# Run PHPStan against the module and a PrestaShop release
56+
phpstan:
57+
name: PHPStan
58+
runs-on: ubuntu-latest
59+
strategy:
60+
matrix:
61+
presta-versions: ['1.7.1.2', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest']
62+
steps:
63+
- name: Setup PHP
64+
uses: shivammathur/setup-php@v2
65+
with:
66+
php-version: '7.4'
67+
68+
- name: Checkout
69+
uses: actions/[email protected]
70+
71+
# Add vendor folder in cache to make next builds faster
72+
- name: Cache vendor folder
73+
uses: actions/cache@v1
74+
with:
75+
path: vendor
76+
key: php-${{ hashFiles('composer.lock') }}
77+
78+
# Add composer local folder in cache to make next builds faster
79+
- name: Cache composer folder
80+
uses: actions/cache@v1
81+
with:
82+
path: ~/.composer/cache
83+
key: php-composer-cache
84+
85+
- run: composer install
86+
87+
# Docker images prestashop/prestashop may be used, even if the shop remains uninstalled
88+
- name: Execute PHPStan on PrestaShop (Tag ${{ matrix.presta-versions }})
89+
run: ./tests/phpstan.sh ${{ matrix.presta-versions }}

0 commit comments

Comments
 (0)