Skip to content

Commit c518024

Browse files
authored
Merge pull request #15641 from phalcon/5.0.x
Release 5.0.0alpha4
2 parents 44aa04c + 6c5edff commit c518024

File tree

108 files changed

+457005
-454180
lines changed

Some content is hidden

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

108 files changed

+457005
-454180
lines changed

.ci/install-php-extensions.sh

Lines changed: 0 additions & 70 deletions
This file was deleted.

.ci/release-notes.sh

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,22 @@
1313
set -eu
1414
set -o pipefail
1515

16-
# Get release info from CHANGELOG
17-
startline=$(cat $1 | grep -nE "^## " | head -n 1 | cut -d ":" -f 1)
18-
finishline=$(($(cat $1 | grep -nE "^# " | head -n 2 | tail -n 1 | cut -d ":" -f 1) - 1))
19-
changelog=`sed -n "${startline},${finishline}p" $1`;
16+
# Get Release notes for the latest release from CHANGELOG.md
17+
# How to use:
18+
# release-notes.sh CHANGELOG.md
19+
20+
startline=$(cat "$1" | grep -nE "^## " | head -n 1 | cut -d ":" -f 1)
21+
finishline=$(($(cat "$1" | grep -nE "^# " | head -n 2 | tail -n 1 | cut -d ":" -f 1) - 1))
22+
changelog=$(sed -n "${startline},${finishline}p" "$1");
23+
24+
25+
: "${GITHUB_ACTIONS:=0}"
26+
27+
if [ "$GITHUB_ACTIONS" = "true" ]
28+
then
29+
changelog="${changelog//'%'/'%25'}"
30+
changelog="${changelog//$'\n'/'%0A'}"
31+
changelog="${changelog//$'\r'/'%0D'}"
32+
fi
2033

2134
echo "${changelog}"

.github/workflows/build-and-test.yml

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ on:
99
- '**.txt'
1010
pull_request:
1111

12+
env:
13+
ZEPHIR_PARSER_VERSION: v1.3.6
14+
ZEPHIR_VERSION: 0.14.0-beta.3
15+
LANG: en_US.UTF-8
16+
LANGUAGE: en_US.UTF-8
17+
LC_ALL: en_US.UTF-8
18+
1219
jobs:
1320
generate:
1421
# To prevent build a particular commit use
@@ -19,14 +26,6 @@ jobs:
1926
name: Build Phalcon Pecl Package
2027
steps:
2128

22-
- name: Setup Environment Variables
23-
run: |
24-
echo "ZEPHIR_PARSER_VERSION=v1.3.6" >> $GITHUB_ENV
25-
echo "ZEPHIR_VERSION=0.13.4" >> $GITHUB_ENV
26-
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
27-
echo "LANGUAGE=en_US.UTF-8" >> $GITHUB_ENV
28-
echo "LC_ALL=en_US.UTF-8" >> $GITHUB_ENV
29-
3029
- name: Setup PHP
3130
uses: shivammathur/setup-php@v2
3231
with:
@@ -36,14 +35,6 @@ jobs:
3635
env:
3736
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3837

39-
- name: Common Settings
40-
run: |
41-
# Core dump settings
42-
ulimit -c unlimited -S || true
43-
44-
# Hide "You are in 'detached HEAD' state" message
45-
git config --global advice.detachedHead false
46-
4738
- name: Checkout Code
4839
uses: actions/checkout@v2
4940
with:
@@ -139,12 +130,14 @@ jobs:
139130

140131
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
141132
steps:
142-
143133
- name: Checkout Code
144134
uses: actions/checkout@v2
145135
with:
146136
fetch-depth: 1
147137

138+
- name: Validate composer
139+
run: composer validate --no-check-all --no-check-publish
140+
148141
- name: Get Composer Cache Directory
149142
id: composer-cache
150143
run: |
@@ -162,7 +155,7 @@ jobs:
162155
with:
163156
php-version: ${{ matrix.php-versions }}
164157
extensions: mbstring, intl, json, imagick, gd, gettext, igbinary, apcu, msgpack, memcached, yaml, redis
165-
ini-values: apc.enable_cli=on, session.save_path=/tmp, extension=psr.so, extension=phalcon.so
158+
ini-values: apc.enable_cli=on, session.save_path=/tmp
166159
tools: pecl
167160
env:
168161
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -202,26 +195,26 @@ jobs:
202195
203196
- name: Run Unit Tests
204197
if: always()
205-
run: vendor/bin/codecept run --ext DotReporter unit
198+
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php-versions }}.xml --ext DotReporter unit
206199

207200
- name: Run CLI Tests
208201
if: always()
209-
run: vendor/bin/codecept run --ext DotReporter cli
202+
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php-versions }}.xml --ext DotReporter cli
210203

211204
- name: Run Integration Tests
212205
env:
213206
DATA_REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
214207
DATA_MEMCACHED_PORT: ${{ job.services.memcached.ports['11211'] }}
215208
if: always()
216-
run: vendor/bin/codecept run --ext DotReporter integration
209+
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php-versions }}.xml --ext DotReporter integration
217210

218211
- name: Run Database Tests (Common)
219212
env:
220213
DATA_REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
221214
DATA_MEMCACHED_PORT: ${{ job.services.memcached.ports['11211'] }}
222215
DATA_MYSQL_USER: root
223216
if: always()
224-
run: vendor/bin/codecept run --ext DotReporter database -g common
217+
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php-versions }}.xml --ext DotReporter database -g common
225218

226219
- name: Run Database Tests (MySQL)
227220
env:
@@ -230,14 +223,14 @@ jobs:
230223
DATA_MEMCACHED_PORT: ${{ job.services.memcached.ports['11211'] }}
231224
DATA_MYSQL_USER: root
232225
if: always()
233-
run: vendor/bin/codecept run --ext DotReporter database --env mysql -g mysql
226+
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php-versions }}.xml --ext DotReporter database --env mysql -g mysql
234227

235228
- name: Run Database Tests (Sqlite)
236229
env:
237230
DATA_REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
238231
DATA_MEMCACHED_PORT: ${{ job.services.memcached.ports['11211'] }}
239232
if: always()
240-
run: vendor/bin/codecept run --ext DotReporter database --env sqlite -g sqlite
233+
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php-versions }}.xml --ext DotReporter database --env sqlite -g sqlite
241234

242235
- name: Run Database Tests (Postgres)
243236
env:
@@ -246,25 +239,31 @@ jobs:
246239
DATA_REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
247240
DATA_MEMCACHED_PORT: ${{ job.services.memcached.ports['11211'] }}
248241
if: always()
249-
run: vendor/bin/codecept run --ext DotReporter database --env pgsql -g pgsql
242+
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php-versions }}.xml --ext DotReporter database --env pgsql -g pgsql
250243

251244
# - name: Run Database Tests (SQL Server)
252245
# env:
253246
# DATA_REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
254247
# DATA_MEMCACHED_PORT: ${{ job.services.memcached.ports['11211'] }}
255248
# run: vendor/bin/codecept run --ext DotReporter database --env sqlsrv
256249

250+
- name: Upload Code Coverage on 7.4
251+
uses: codecov/codecov-action@v1
252+
with:
253+
token: ${{ secrets.CODECOV_TOKEN }}
254+
file: ./tests/_output/coverage-*.xml
255+
257256
build-and-test-macos:
258257
# To prevent build a particular commit use
259-
# git commit -m "......... [ci skip]"
258+
# git commit -m "......... [ci skip]"
260259
if: "!contains(github.event.head_commit.message, 'ci skip')"
261260

262261
needs: generate
263262
runs-on: ${{ matrix.operating-system }}
264263
env:
265264
extensions: mbstring, intl, json, yaml, apcu, imagick, gd, gettext, igbinary, msgpack, redis, zip
266265
HOMEBREW_NO_INSTALL_CLEANUP: 1
267-
# ext_cache_key: v5.0.0-alpha.2-macOS-2
266+
ext_cache_key: v5.0.0-alpha.3-macOS-2
268267
strategy:
269268
fail-fast: false
270269
matrix:
@@ -302,16 +301,16 @@ jobs:
302301
env:
303302
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
304303

305-
# - name: Get composer cache directory
306-
# id: composer-cache
307-
# run: echo "::set-output name=dir::$(composer config cache-files-dir)"
304+
- name: Get composer cache directory
305+
id: composer-cache
306+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
308307

309-
# - name: Cache dependencies
310-
# uses: actions/cache@v2
311-
# with:
312-
# path: ${{ steps.composer-cache.outputs.dir }}
313-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
314-
# restore-keys: ${{ runner.os }}-composer-
308+
- name: Cache dependencies
309+
uses: actions/cache@v2
310+
with:
311+
path: ${{ steps.composer-cache.outputs.dir }}
312+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
313+
restore-keys: ${{ runner.os }}-composer-
315314

316315
- name: Download Phalcon Pecl Package
317316
uses: actions/download-artifact@v1
@@ -345,7 +344,7 @@ jobs:
345344

346345
build-and-test-windows:
347346
# To prevent build a particular commit use
348-
# git commit -m "......... [ci skip]"
347+
# git commit -m "......... [ci skip]"
349348
if: "!contains(github.event.head_commit.message, 'ci skip')"
350349

351350
name: PHP ${{ matrix.php-versions }} (${{ matrix.arch }}-${{ matrix.ts }}) Test on ${{ matrix.operating-system }}
@@ -402,7 +401,7 @@ jobs:
402401
403402
# FIXME: phpversion() return 7.4.3 but windows.php.net has only 7.4.4
404403
# We should parse the following file to get the correct version:
405-
# https://windows.php.net/downloads/releases/sha256sum.txt
404+
# https://windows.php.net/downloads/releases/sha256sum.txt
406405
If ("${{ matrix.php-versions }}" -eq "7.4") {
407406
Write-Output "PHP_VERSION=7.4.4" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
408407
} Else {
@@ -416,7 +415,7 @@ jobs:
416415
Write-Output "PACKAGE_PREFIX=phalcon" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
417416
Write-Output "EXTENSION_NAME=phalcon" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
418417
Write-Output "EXTENSION_FILE=php_phalcon.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
419-
Write-Output "PHALCON_VERSION=5.0.0alpha3" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
418+
Write-Output "PHALCON_VERSION=5.0.0alpha4" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
420419
Write-Output "PHPTS=${{ matrix.ts }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
421420
If ("${{ matrix.ts }}" -eq "nts") {
422421
Write-Output "BUILD_TYPE=nts-${{ matrix.build_type }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
@@ -619,7 +618,7 @@ jobs:
619618
id: get-version
620619
run: |
621620
echo ::set-output name=version::${GITHUB_REF#refs/tags/}
622-
echo ::set-output name=release_body::${.ci/release-notes.sh CHANGELOG-5.0.md}
621+
echo ::set-output name=release_body::$(.ci/release-notes.sh CHANGELOG-5.0.md)
623622
624623
- name: Download Phalcon build artifacts
625624
id: download

0 commit comments

Comments
 (0)