Skip to content

Commit 7e6cc65

Browse files
committed
Laravel integration tests
1 parent a1947a2 commit 7e6cc65

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/tests.yml

+49
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request: null
55
push:
66
branches:
7+
- fix/relay-port
78
- main
89

910
concurrency:
@@ -46,3 +47,51 @@ jobs:
4647

4748
- name: Test benchmarks
4849
run: composer run bench -- --runs=1
50+
51+
laravel:
52+
53+
name: Laravel
54+
runs-on: ubuntu-latest
55+
timeout-minutes: 5
56+
57+
services:
58+
redis:
59+
image: redis
60+
ports:
61+
- 6379:6379
62+
options: >-
63+
--health-cmd "redis-cli ping"
64+
--health-interval 1s
65+
--health-timeout 1s
66+
--health-retries 5
67+
68+
steps:
69+
- name: Checkout code
70+
uses: actions/checkout@v3
71+
72+
- name: Setup PHP
73+
uses: shivammathur/setup-php@v2
74+
with:
75+
php-version: '8.2'
76+
extensions: redis, relay
77+
tools: composer
78+
coverage: none
79+
80+
- name: Install Laravel installer
81+
run: composer require laravel/installer --no-interaction --prefer-dist --optimize-autoloader
82+
83+
- name: Install Laravel example app
84+
run: composer exec laravel new example-app
85+
86+
- name: Install Composer dependencies
87+
working-directory: example-app
88+
run: |
89+
composer config repositories.cachewerk/relay path ${{ github.workspace }}
90+
composer require cachewerk/relay @dev
91+
92+
- name: Make and run test command
93+
working-directory: example-app
94+
run: |
95+
php artisan make:command VerifyRelay --no-interaction
96+
sed -i 's|//|dump(\\CacheWerk\\Relay\\Laravel\\Relay::stats(), \\Illuminate\\Support\\Facades\\Redis::info());|' app/Console/Commands/VerifyRelay.php
97+
REDIS_CLIENT=relay php artisan app:verify-relay

0 commit comments

Comments
 (0)