-
Notifications
You must be signed in to change notification settings - Fork 6
65 lines (53 loc) · 2.06 KB
/
tests.yaml
File metadata and controls
65 lines (53 loc) · 2.06 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
name: Test Suite
on:
push:
pull_request:
jobs:
php_tests:
if: "!contains(github.event.head_commit.message, 'changelog')"
runs-on: ${{ matrix.os }}
strategy:
matrix:
php: [8.3, 8.4, 8.5]
laravel: [12.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Get changed files (Payments)
id: changed-files-payments
uses: tj-actions/changed-files@v46
with:
files: |
.github/workflows/tests.yaml
src/Payments
src/Http/Controllers/Payments
tests/Feature/Payments
composer.json
- name: Determine whether payment tests should run
id: should-run-payment-tests
if: steps.changed-files-payments.outputs.any_modified == 'true' || github.event_name == 'schedule'
run: |
echo "result=true" >> $GITHUB_OUTPUT
echo "result=true" >> $env:GITHUB_OUTPUT
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: fileinfo, exif, gd, pdo, sqlite, pdo_sqlite, intl
- name: Install dependencies
run: |
composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit --exclude-group=payments
- name: Execute tests (Payments)
run: vendor/bin/phpunit --group=payments
if: steps.should-run-payment-tests.outputs.result == 'true' && matrix.php == 8.5 && matrix.laravel == '12.*' && matrix.stability == 'prefer-stable'
env:
STRIPE_KEY: ${{ secrets.STRIPE_KEY }}
STRIPE_SECRET: ${{ secrets.STRIPE_SECRET }}
MOLLIE_KEY: ${{ secrets.MOLLIE_KEY }}
MOLLIE_PROFILE: ${{ secrets.MOLLIE_PROFILE }}