update comments and project settings #40
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: Unit Tests | |
on: [ push, pull_request, workflow_dispatch ] | |
jobs: | |
ci: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
phpunit: ["~8.0.0", "~8.0", "~9.0.0", "~9.0"] | |
name: Run Tests With PHPUnit ${{ matrix.phpunit }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Start Docker Containers | |
uses: isbang/[email protected] | |
- name: Install Dependencies | |
run: | | |
set -ex | |
sleep 15 # Seems that we need to give the MySQL container enough time to warm up. | |
docker compose exec -T swoole composer require "phpunit/phpunit=${{ matrix.phpunit }}" -W -nq --no-progress | |
docker compose exec -T swoole ./vendor/bin/phpunit --version # Check current version of PHPUnit. | |
- name: Run Unit Tests | |
run: | | |
set -ex | |
# Run tests using PHPUnit (Swoole is disabled). | |
docker compose exec -T php ./vendor/bin/phpunit --testsuite global | |
docker compose exec -T php ./vendor/bin/phpunit --testsuite case-by-case | |
# Run tests using PHPUnit, with Swoole enabled. | |
docker compose exec -T swoole ./vendor/bin/phpunit --testsuite global | |
docker compose exec -T swoole ./vendor/bin/phpunit --testsuite case-by-case | |
# Run tests using counit (Swoole is disabled). | |
docker compose exec -T php ./counit --testsuite global | |
docker compose exec -T php ./counit --testsuite case-by-case | |
# Run tests using counit, with Swoole enabled. | |
docker compose exec -T swoole ./counit --testsuite global | |
docker compose exec -T swoole ./counit --testsuite case-by-case |