Skip to content

Commit

Permalink
Merge pull request #4701 from codeigniter4/develop
Browse files Browse the repository at this point in the history
4.1.2 Ready code
  • Loading branch information
MGatner authored May 18, 2021
2 parents 5e852b3 + fe31333 commit 10067eb
Show file tree
Hide file tree
Showing 532 changed files with 18,743 additions and 8,861 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: ./source/.github/scripts/deploy-framework ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/framework ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@v3
uses: actions/github-script@v4.0.2
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
run: ./source/.github/scripts/deploy-appstarter ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/appstarter ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@v3
uses: actions/github-script@v4.0.2
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
jobs:
build:
name: PHP ${{ matrix.php-versions }} Static Analysis
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
run: mkdir -p ${{ steps.composer-cache.outputs.dir }}

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v2.1.5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -64,7 +64,7 @@ jobs:
run: mkdir -p build/phpstan

- name: Cache PHPStan result cache directory
uses: actions/cache@v2
uses: actions/cache@v2.1.5
with:
path: build/phpstan
key: ${{ runner.os }}-phpstan-${{ github.sha }}
Expand Down
36 changes: 23 additions & 13 deletions .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
- spark
- phpunit.xml.dist
- '**.php'
- phpunit.xml.dist
- .github/workflows/test-phpunit.yml
pull_request:
branches:
Expand All @@ -29,13 +28,12 @@ on:
- spark
- phpunit.xml.dist
- '**.php'
- phpunit.xml.dist
- .github/workflows/test-phpunit.yml

jobs:

tests:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }}

Expand Down Expand Up @@ -64,23 +62,28 @@ jobs:
- 5432:5432
options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
mssql:
image: microsoft/mssql-server-linux:2017-latest
image: mcr.microsoft.com/mssql/server:2019-CU10-ubuntu-20.04
env:
SA_PASSWORD: 1Secure*Password1
ACCEPT_EULA: Y
MSSQL_PID: Developer
ports:
- 1433:1433
options: --health-cmd="/opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U sa -P 1Secure*Password1 -Q 'SELECT @@VERSION'" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
memcached:
image: memcached:1.6-alpine
ports:
- 11211:11211

steps:
- name: Create database for MSSQL Server
if: ${{ matrix.db-platforms == 'SQLSRV'}}
run: sqlcmd -S localhost -U sa -P 1Secure*Password1 -Q "CREATE DATABASE test"
if: matrix.db-platforms == 'SQLSRV'
run: sqlcmd -S 127.0.0.1 -U sa -P 1Secure*Password1 -Q "CREATE DATABASE test"

- name: Checkout
uses: actions/checkout@v2
Expand All @@ -90,20 +93,23 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
tools: composer, pecl
extensions: imagick, sqlsrv-beta
extensions: imagick, sqlsrv, gd, sqlite3, redis, memcached, pgsql
coverage: xdebug
env:
update: true

- name: Install Memcached
uses: niden/actions-memcached@v7
- name: Install latest ImageMagick
run: |
sudo apt-get remove ghostscript
sudo apt-get update
sudo apt-get install -y imagemagick ghostscript-x gsfonts
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v2.1.5
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -112,13 +118,17 @@ jobs:
- name: Install dependencies
run: |
composer update --ansi --no-interaction
composer remove --ansi --dev --unused rector/rector phpstan/phpstan codeigniter4/codeigniter4-standard squizlabs/php_codesniffer
composer remove --ansi --dev --unused -W rector/rector phpstan/phpstan codeigniter4/codeigniter4-standard squizlabs/php_codesniffer
php -r 'file_put_contents("vendor/laminas/laminas-zendframework-bridge/src/autoload.php", "");'
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}

- name: Profile slow tests in PHP 7.4 MySQLi for now
if: matrix.php-versions == '7.4' && matrix.db-platforms == 'MySQLi'
run: echo "TACHYCARDIA_MONITOR_GA=enabled" >> $GITHUB_ENV

- name: Test with PHPUnit
run: script -e -c "vendor/bin/phpunit -v"
run: script -e -c "vendor/bin/phpunit --color=always"
env:
DB: ${{ matrix.db-platforms }}
TERM: xterm-256color
Expand All @@ -135,7 +145,7 @@ jobs:

coveralls-finish:
needs: [tests]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/test-rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- 'system/**'
- '.github/workflows/test-rector.yml'
- composer.json
- 'utils/Rector/**'
- 'rector.php'
push:
branches:
Expand All @@ -22,20 +23,25 @@ on:
- 'system/**'
- '.github/workflows/test-rector.yml'
- composer.json
- 'utils/Rector/**'
- 'rector.php'

jobs:
build:
name: Analyze code (Rector)
runs-on: ubuntu-latest
name: PHP ${{ matrix.php-versions }} Analyze code (Rector)
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: ${{ matrix.php-versions }}
extensions: intl

- name: Use latest Composer
Expand All @@ -52,7 +58,7 @@ jobs:
run: mkdir -p ${{ steps.composer-cache.outputs.dir }}

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v2.1.5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -62,4 +68,4 @@ jobs:
run: composer update --ansi --no-interaction

- name: Run static analysis
run: vendor/bin/rector process --dry-run
run: vendor/bin/rector process --dry-run --no-progress-bar
2 changes: 1 addition & 1 deletion .github/workflows/test-userguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
syntax_check:
name: Check User Guide syntax
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ammaraskar/[email protected]
Expand Down
Loading

0 comments on commit 10067eb

Please sign in to comment.