-
Notifications
You must be signed in to change notification settings - Fork 5
89 lines (76 loc) · 2.77 KB
/
e2e.yml
File metadata and controls
89 lines (76 loc) · 2.77 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: E2E (manual)
on:
workflow_dispatch:
inputs:
php-version:
description: "Run E2E tests on this PHP version"
required: false
default: "8.3"
type: choice
options:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
- "8.5"
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
e2e:
name: E2E / PHP ${{ inputs.php-version }}
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP ${{ inputs.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
extensions: json, mbstring
coverage: none
tools: composer:v2
- name: Determine PHPUnit constraint
id: phpunit
run: |
case "${{ inputs.php-version }}" in
7.1|7.2) echo "constraint=^7.5" >> "$GITHUB_OUTPUT" ;;
*) echo "constraint=^9.5" >> "$GITHUB_OUTPUT" ;;
esac
- name: Resolve Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-e2e-${{ inputs.php-version }}-${{ steps.phpunit.outputs.constraint }}-${{ hashFiles('composer.json') }}
restore-keys: |
composer-e2e-${{ inputs.php-version }}-
- name: Allow legacy PHPUnit on PHP 7.1/7.2
if: inputs.php-version == '7.1' || inputs.php-version == '7.2'
# PHP 7.1 ships an older Composer (<=2.2) that lacks the audit.block-insecure setting,
# so the command exits non-zero. That same older Composer also does not enforce the
# block, so ignoring the failure is safe.
run: composer config --no-plugins audit.block-insecure false || true
- name: Pin PHPUnit constraint
run: composer require --dev --no-update --no-interaction "phpunit/phpunit:${{ steps.phpunit.outputs.constraint }}"
- name: Install dependencies
env:
COMPOSER_NO_AUDIT: "1"
run: composer update --prefer-dist --no-interaction --no-progress
- name: Run E2E tests
env:
SOLAPI_API_KEY: ${{ secrets.SOLAPI_API_KEY }}
SOLAPI_API_SECRET: ${{ secrets.SOLAPI_API_SECRET }}
SOLAPI_KAKAO_PF_ID: ${{ secrets.SOLAPI_KAKAO_PF_ID }}
SOLAPI_SENDER_NUMBER: ${{ secrets.SOLAPI_SENDER_NUMBER }}
SOLAPI_RECIPIENT_NUMBER: ${{ secrets.SOLAPI_RECIPIENT_NUMBER }}
run: composer test:e2e