Skip to content

Commit

Permalink
Added PHP8.0 to build pipeline (#320)
Browse files Browse the repository at this point in the history
* removed travis-ci and added github actions build status to readme

Signed-off-by: fenn-cs <[email protected]>

* added php 8 to ci, updated build name

Signed-off-by: fenn-cs <[email protected]>

* allow safe fail for php8

Signed-off-by: fenn-cs <[email protected]>
  • Loading branch information
nfebe authored Feb 13, 2021
1 parent f6596fe commit 9c9163b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: phpList Build
name: phpList Core Build
on: [push, pull_request]
jobs:
main:
Expand All @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4']
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -51,12 +51,16 @@ jobs:
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
continue-on-error: ${{matrix.php-versions == '8.0' }} # Temporal until full support for php8 === [temp-php8]
- name: Validating composer.json
run: composer validate --no-check-all --no-check-lock --strict;
continue-on-error: ${{matrix.php-versions == '8.0' }} # [temp-php8]
- name: Linting all php files
run: find src/ tests/ public/ -name ''*.php'' -print0 | xargs -0 -n 1 -P 4 php -l; php -l bin/*;
continue-on-error: ${{matrix.php-versions == '8.0' }} # [temp-php8]
- name: Run units tests with phpunit
run: vendor/bin/phpunit tests/Unit/
continue-on-error: ${{matrix.php-versions == '8.0' }} # [temp-php8]
- name: Run integration tests with phpunit
run: |
export PHPLIST_DATABASE_NAME=${{ env.DB_DATABASE }}
Expand All @@ -65,11 +69,16 @@ jobs:
export PHPLIST_DATABASE_PORT=${{ job.services.mysql.ports['3306'] }}
export PHPLIST_DATABASE_HOST=127.0.0.1
vendor/bin/phpunit tests/Integration/
continue-on-error: ${{matrix.php-versions == '8.0' }} # [temp-php8]
- name: Running the system tests
run: vendor/bin/phpunit tests/System/;
continue-on-error: ${{matrix.php-versions == '8.0' }} # [temp-php8]
- name: Running static analysis
run: vendor/bin/phpstan analyse -l 5 bin/ src/ tests/ public/;
continue-on-error: ${{matrix.php-versions == '8.0' }} # [temp-php8]
- name: Running PHPMD
run: vendor/bin/phpmd src/ text config/PHPMD/rules.xml;
continue-on-error: ${{matrix.php-versions == '8.0' }} # [temp-php8]
- name: Running PHP_CodeSniffer
run: vendor/bin/phpcs --standard=config/PhpCodeSniffer/ bin/ src/ tests/ public/;
run: vendor/bin/phpcs --standard=config/PhpCodeSniffer/ bin/ src/ tests/ public/;
continue-on-error: ${{matrix.php-versions == '8.0' }} # [temp-php8]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# phpList core module


<<<<<<< HEAD
[![Build Status](https://github.com/phpList/core/workflows/phpList%20Core%20Build/badge.svg)](https://github.com/phpList/core/actions)
=======
[![Build Status](https://github.com/phpList/core/workflows/phpList%20Build/badge.svg)](https://github.com/phpList/web-frontend/actions)
>>>>>>> f6596fe9bfb52b9b788084880b7b88dd7758c4ed
[![Latest Stable Version](https://poser.pugx.org/phplist/core/v/stable.svg)](https://packagist.org/packages/phpList/core)
[![Total Downloads](https://poser.pugx.org/phplist/core/downloads.svg)](https://packagist.org/packages/phpList/core)
[![Latest Unstable Version](https://poser.pugx.org/phplist/core/v/unstable.svg)](https://packagist.org/packages/phpList/core)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"source": "https://github.com/phpList/core"
},
"require": {
"php": ">=7.0",
"php": "^7.0|^8.0",
"doctrine/orm": "^2.5.0",
"doctrine/common": "^2.6.0",
"doctrine/doctrine-bundle": "^1.8.0",
Expand Down

0 comments on commit 9c9163b

Please sign in to comment.