Only run phplint at php 8.0

Do not run codeception at php 8.0(currently not works)
This commit is contained in:
Lastorder-DC 2020-12-14 11:09:56 +09:00
parent 6eccfb1b0d
commit 8ebb2b22a9

View file

@ -11,7 +11,8 @@ jobs:
strategy: strategy:
matrix: matrix:
operating-system: [ ubuntu-16.04 ] operating-system: [ ubuntu-16.04 ]
php: [ '7.0', '7.1', '7.2', '7.3', '7.4' ] php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ]
name: PHP ${{ matrix.php }} name: PHP ${{ matrix.php }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -22,22 +23,28 @@ jobs:
php-version: ${{ matrix.php }} php-version: ${{ matrix.php }}
- name: Start MySQL - name: Start MySQL
if: matrix.php != '8.0'
run: sudo systemctl start mysql.service run: sudo systemctl start mysql.service
- name: Create database - name: Create database
if: matrix.php != '8.0'
run: mysql -uroot -proot -e "CREATE DATABASE rhymix CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci" run: mysql -uroot -proot -e "CREATE DATABASE rhymix CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci"
- name: Create user and set privileges - name: Create user and set privileges
if: matrix.php != '8.0'
run: mysql -uroot -proot -e "create user 'travis'@'localhost' identified by 'travis'; FLUSH PRIVILEGES" && mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON rhymix.* TO travis@localhost" run: mysql -uroot -proot -e "create user 'travis'@'localhost' identified by 'travis'; FLUSH PRIVILEGES" && mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON rhymix.* TO travis@localhost"
- name: Download codeception - name: Download codeception
if: matrix.php != '8.0'
run: wget https://codeception.com/releases/2.3.9/codecept.phar run: wget https://codeception.com/releases/2.3.9/codecept.phar
- name: Run PHP development server - name: Run PHP development server
if: matrix.php != '8.0'
run: php -S localhost:8000 & run: php -S localhost:8000 &
- name: PHP Lint - name: PHP Lint
run: if find . -name "*.php" ! -path "./vendor/*" -print0 | xargs -0 -n 1 -P 8 php -l | grep -v "No syntax errors detected"; then exit 1; fi run: if find . -name "*.php" ! -path "./vendor/*" -print0 | xargs -0 -n 1 -P 8 php -l | grep -v "No syntax errors detected"; then exit 1; fi
- name: Build and run codeception - name: Build and run codeception
if: matrix.php != '8.0'
run: php codecept.phar build && php codecept.phar run --debug --fail-fast --env travis run: php codecept.phar build && php codecept.phar run --debug --fail-fast --env travis