-
Notifications
You must be signed in to change notification settings - Fork 27
89 lines (77 loc) · 2.5 KB
/
Copy pathrun-tests.yml
File metadata and controls
89 lines (77 loc) · 2.5 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
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
name: run-tests
on:
push:
branches:
- main
- dev-main
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
fail-fast: true
matrix:
php: [ 8.3, 8.4 ]
laravel: [ 13.*, 12.*, 11.* ]
include:
- laravel: 13.*
testbench: 11.*
- laravel: 12.*
testbench: 10.*
- laravel: 11.*
testbench: 9.*
name: P${{ matrix.php }} - L${{ matrix.laravel }}
env:
BROADCAST_DRIVER: log
CACHE_DRIVER: redis
QUEUE_CONNECTION: redis
SESSION_DRIVER: redis
DB_CONNECTION: testing
APP_KEY: base64:2fl+Ktvkfl+Fuz3Qp/A76G2RTiGVA/ZjKZaz6fiiM10=
APP_ENV: testing
BCRYPT_ROUNDS: 10
MAIL_MAILER: array
TELESCOPE_ENABLED: false
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.18.0
env:
discovery.type: single-node
xpack.security.enabled: 'false'
ES_JAVA_OPTS: '-Xms512m -Xmx512m'
ports:
- 9200:9200
options: >-
--health-cmd="curl http://localhost:9200/_cluster/health"
--health-interval=10s
--health-timeout=5s
--health-retries=5
redis:
image: redis
ports:
- 6379/tcp
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Verify Elasticsearch connection
run: |
curl -X GET "localhost:${{ job.services.elasticsearch.ports['9200'] }}/_cluster/health?pretty=true"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: xdebug
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, mysql
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --prefer-stable --prefer-dist --no-interaction
- name: List Installed Dependencies
run: composer show -D
- name: Run tests
run: vendor/bin/pest --ci
env:
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
ELASTICSEARCH_PORT: ${{ job.services.elasticsearch.ports['9200'] }}