Legacy 4.9 #30
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: PHPUnit | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "*.*.*" | |
pull_request: | |
branches: | |
- master | |
jobs: | |
Build: | |
runs-on: 'ubuntu-latest' | |
container: 'byjg/php:${{ matrix.php-version }}-cli' | |
strategy: | |
matrix: | |
php-version: | |
- "8.2" | |
- "8.1" | |
- "8.0" | |
- "7.4" | |
services: | |
mongodb: | |
image: mongo:3 | |
env: | |
TZ: America/Winnipeg | |
ports: | |
- 27017:27017 | |
dynamodb: | |
image: amazon/dynamodb-local | |
ports: | |
- 8000:8000 | |
s3: | |
image: localstack/localstack | |
ports: | |
- "4566:4566" | |
env: | |
SERVICES: s3 | |
DEFAULT_REGION: us-west-1 | |
AWS_DEFAULT_REGION: us-west-1 | |
HOSTNAME: s3 | |
HOSTNAME_EXTERNAL: s3 | |
USE_SSL: false | |
DEBUG: 1 | |
options: >- | |
--health-cmd "awslocal s3 ls" | |
--health-interval 5s | |
--health-timeout 10s | |
--health-retries 5 | |
env: | |
MONGODB_CONNECTION: "mongodb://mongodb/test" | |
S3_CONNECTION: "s3://aaa:12345678@us-east-1/mybucket?create=true&endpoint=http://s3:4566" | |
DYNAMODB_CONNECTION: "dynamodb://aaa:123456@us-east-1/tablename?endpoint=http://dynamodb:8000" | |
steps: | |
- uses: actions/checkout@v4 | |
- run: composer install | |
- run: ./vendor/bin/phpunit | |
Documentation: | |
if: github.ref == 'refs/heads/master' | |
needs: Build | |
uses: byjg/byjg.github.io/.github/workflows/add-doc.yaml@master | |
with: | |
folder: php | |
project: ${{ github.event.repository.name }} | |
secrets: inherit | |