Skip to content

#172: update CHANGELOG #496

#172: update CHANGELOG

#172: update CHANGELOG #496

Workflow file for this run

name: Unit Tests
on: [ push, pull_request, workflow_dispatch ]
jobs:
# Run unit tests with Swoole 5.0, Swoole 5.1, and latest code of Swoole.
unit-tests:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
php: ["8.0", "8.1", "8.2", "8.3"]
swoole-prefix: ["5.0-", "5.1-", ""]
exclude:
- php: "8.3"
swoole-prefix: "5.0-"
name: Run Tests Using Image ${{ matrix.swoole-prefix }}php${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Services
run: |
sed -i.bak -e "s/^FROM phpswoole\/swoole.*$/FROM phpswoole\/swoole:${{ matrix.swoole-prefix }}php${{ matrix.php }}/g" ./Dockerfile
docker-compose up -d
docker ps -a
docker-compose exec -T app php -v
docker-compose exec -T app php --ri swoole
docker-compose exec -T app composer install -n -q --no-progress
- name: Run Unit Tests
run: |
sleep 40s
docker-compose exec -T app composer test
- name: Stop and Remove Docker Containers
run: docker-compose down