Skip to content

Commit

Permalink
use GitHub Action isbang/compose-action to manage Docker containers
Browse files Browse the repository at this point in the history
  • Loading branch information
deminy committed Jun 2, 2024
1 parent 136b038 commit a60d9c4
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Services
- name: Customize Dockerfile
run: sed -i.bak -e "s/^FROM phpswoole\/swoole.*$/FROM phpswoole\/swoole:${{ matrix.swoole-prefix }}php${{ matrix.php }}/g" ./Dockerfile

- name: Start Docker Containers
uses: isbang/compose-action@v2.0.0

- name: Prepare Test Environment
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
- name: Run Unit Tests
run: docker-compose exec -T app composer test

0 comments on commit a60d9c4

Please sign in to comment.