Simplify and clean up github actions

This commit is contained in:
Kijin Sung 2021-01-02 23:29:22 +09:00
parent 667004407c
commit bde542e669

View file

@ -1,10 +1,5 @@
name: PHP Lint & Run codeception
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ develop ]
name: PHP Lint & Codeception
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
@ -23,11 +18,11 @@ jobs:
- name: Start MySQL
run: sudo systemctl start mysql.service
- name: Create database
run: mysql -uroot -proot -e "CREATE DATABASE rhymix CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci"
- name: Create user and set privileges
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: Create MySQL database and user
run: |
sudo mysql -uroot -proot -e "CREATE DATABASE rhymix CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci"
sudo mysql -uroot -proot -e "CREATE USER 'travis'@'localhost' identified by 'travis'"
sudo mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON rhymix.* TO travis@localhost; FLUSH PRIVILEGES"
- 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