-
Notifications
You must be signed in to change notification settings - Fork 10
97 lines (78 loc) · 2.36 KB
/
tests.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Tests
on:
pull_request: null
push:
branches:
- fix/relay-port
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmarks:
name: Benchmarks
runs-on: ubuntu-latest
timeout-minutes: 5
services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 1s
--health-timeout 1s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: redis, relay
tools: composer
coverage: none
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader
- name: Test benchmarks
run: composer run bench -- --runs=1
laravel:
name: Laravel
runs-on: ubuntu-latest
timeout-minutes: 5
services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 1s
--health-timeout 1s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: redis, relay
tools: composer
coverage: none
- name: Install Laravel installer
run: composer require laravel/installer --no-interaction --prefer-dist --optimize-autoloader
- name: Install Laravel example app
run: composer exec laravel new example-app
- name: Install Composer dependencies
working-directory: example-app
run: |
composer config repositories.cachewerk/relay path ${{ github.workspace }}
composer require cachewerk/relay @dev
- name: Make and run test command
working-directory: example-app
run: |
php artisan make:command VerifyRelay --no-interaction
sed -i 's|//|dd(\\CacheWerk\\Relay\\Laravel\\Relay::stats(), \\Illuminate\\Support\\Facades\\Redis::info());|' app/Console/Commands/VerifyRelay.php
REDIS_CLIENT=relay php artisan app:verify-relay