ci. 在 push 时自动规范 PHP 代码,保留原来的检查以兼顾 pr #524
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run PHPUnit Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
phpunit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress --no-interaction | |
- name: Execute tests | |
run: vendor/bin/phpunit tests/phpunit --verbose |