-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.24 KB
/
unit-test.yml
File metadata and controls
40 lines (38 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: unit-test.yml
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
unit-test:
strategy:
matrix:
os: [ 'ubuntu-latest' ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
rabbit: [ '3.10', '3.11', '3.12', '3.13', '4.0', '4.1', '4.2' ]
runs-on: ${{matrix.os}}
services:
rabbit:
image: rabbitmq:${{matrix.rabbit}}-management
ports:
- 5672:5672
steps:
- name: Start PubSub emulator
run: |
docker run -d -p 8085:8085 gcr.io/google.com/cloudsdktool/google-cloud-cli:emulators \
gcloud beta emulators pubsub start --host-port=0.0.0.0:8085
timeout 30 bash -c 'until curl -s http://localhost:8085 > /dev/null 2>&1; do sleep 1; done'
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.php}}
coverage: xdebug
tools: composer, phpunit
- run: composer install -n --prefer-dist --no-security-blocking
- run: php vendor/phpunit/phpunit/phpunit -c phpunit.xml --coverage-clover=coverage.xml
env:
PUBSUB_EMULATOR_HOST: localhost:8085
- run: php vendor/bin/coverage-check coverage.xml 10