Skip to content

use GitHub Action isbang/compose-action to manage Docker containers #22

use GitHub Action isbang/compose-action to manage Docker containers

use GitHub Action isbang/compose-action to manage Docker containers #22

Workflow file for this run

name: Unit Tests
on: [ push, pull_request, workflow_dispatch ]
jobs:
ci:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: ["7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
name: Tests Under PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Customize Dockerfile
run: sed "s/%%PHP_VERSION%%/${{ matrix.php }}/g" Dockerfile.tpl > Dockerfile
- name: Start Docker Containers
uses: isbang/[email protected]
- name: Run Unit Tests
run: |
set -ex
sleep 2 # Give the containers enough time to warm up before running unit tests.
docker compose exec -T php bash -c "./vendor/bin/phpunit"