Fix example Dockerfile #136
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
phpunit: | |
name: Tests | |
runs-on: ubuntu-latest | |
services: | |
redis: | |
image: redis:6 | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd="redis-cli ping" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=3 | |
memcached: | |
image: memcached:1.6.5 | |
ports: | |
- 11211:11211 | |
mongodb: | |
image: mongo | |
ports: | |
- 27017:27017 | |
strategy: | |
matrix: | |
php-version: | |
- "8.0" | |
- "8.1" | |
- "8.2" | |
composer-opts: | |
- "" | |
- --prefer-lowest --prefer-stable | |
steps: | |
- uses: actions/checkout@v2 | |
# https://github.com/shivammathur/setup-php | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: composer | |
# Specific versions of extensions available on PECL can be set up by suffixing the extension's name with the version. | |
# https://github.com/shivammathur/setup-php?tab=readme-ov-file#heavy_plus_sign-php-extension-support | |
extensions: apcu, redis-5.3.7, memcached, mongodb | |
ini-values: apc.enable_cli=1 | |
coverage: xdebug | |
env: | |
fail-fast: true | |
- name: Update dependencies with composer | |
run: composer update ${{ matrix.composer-opts }} | |
- name: Run tests with PHPUnit | |
run: vendor/bin/phpunit | |
# https://github.com/php-coveralls/php-coveralls#github-actions | |
- name: Upload coverage results to Coveralls | |
if: ${{ matrix.php-version == '8.0' }} | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
composer global require php-coveralls/php-coveralls | |
php-coveralls --coverage_clover=build/logs/clover.xml -v |