-
Notifications
You must be signed in to change notification settings - Fork 20
79 lines (71 loc) · 2.25 KB
/
test.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
name: Run Tests
on:
push:
branches: [main]
pull_request_target:
types: [labeled]
branches: [main]
jobs:
test:
name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test')
strategy:
max-parallel: 1
matrix:
php: [7.4, 8.0, 8.1, 8.2, 8.3]
laravel: [8.*, 9.*, 10.*, 11.*]
include:
- php: 7.4
laravel: 8.*
testbench: 6.*
phpunit: 9.*
- php: 8.0
laravel: 8.*
testbench: 6.*
phpunit: 9.*
- php: 8.1
laravel: 8.*
testbench: 6.*
phpunit: 9.*
- php: 8.0
laravel: 9.*
testbench: 7.*
phpunit: 9.*
- php: 8.1
laravel: 9.*
testbench: 7.*
phpunit: 9.*
exclude:
- php: 7.4
laravel: 9.*
- php: 8.2
laravel: 8.*
- php: 8.2
laravel: 9.*
services:
stripemock:
image: stripe/stripe-mock:v0.141.0
ports:
- 12111
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
- name: Install dependencies
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_LICENSE_KEY }}"
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-progress --no-suggest
- name: Copy .env.example to .env
run: cp .env.testing.example .env.testing
- name: Run PHP tests
run: vendor/bin/phpunit
env:
STRIPE_TEST_SECRET: "${{ secrets.STRIPE_SECRET }}"
STRIPE_API_BASE: "127.0.0.1:${{ job.services.stripemock.ports[12111] }}"