-
Notifications
You must be signed in to change notification settings - Fork 14
54 lines (52 loc) · 2.06 KB
/
integration-tests.yml
File metadata and controls
54 lines (52 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
name: integration tests
on:
push:
branches:
- 'main'
workflow_dispatch:
inputs:
php-version:
description: 'PHP version to run tests on'
required: false
default: '8.1'
type: string
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
name: integration tests
env:
UNZER_PAPI_TEST_PRIVATE_KEY_DEFAULT: ${{ secrets.PAPI_PRIVATE_KEY_DEFAULT }}
UNZER_PAPI_TEST_PRIVATE_KEY_ALTERNATIVE: ${{ secrets.PAPI_PRIVATE_KEY_ALTERNATIVE }}
UNZER_PAPI_TEST_PRIVATE_KEY_LEGACY: ${{ secrets.PAPI_PRIVATE_KEY_LEGACY }}
UNZER_APPLE_MERCHANT_ID_PATH: ${{ secrets.UNZER_APPLE_MERCHANT_ID_PATH }}
UNZER_APPLE_CA_CERTIFICATE_PATH: ${{ secrets.UNZER_APPLE_CA_CERTIFICATE_PATH }}
APPLE_PAY_MERCHANT_ID_CERT: ${{ secrets.APPLE_PAY_MERCHANT_ID_CERT }}
APPLE_PAY_MERCHANT_ID_CERT_COMBINED: ${{ secrets.APPLE_PAY_MERCHANT_ID_CERT_COMBINED }}
APPLE_PAY_MERCHANT_ID_KEY: ${{ secrets.APPLE_PAY_MERCHANT_ID_KEY }}
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version || '8.1' }}
ini-values: error_reporting=E_ALL, display_errors=On, display_startup_errors=On
- name: Setup Apple Pay test certificate
run: mkdir certs
- run: echo "$APPLE_PAY_MERCHANT_ID_CERT" > certs/merchant_id.pem
- run: echo "$APPLE_PAY_MERCHANT_ID_CERT_COMBINED" > certs/apple-pay-cert.pem
- run: echo "$APPLE_PAY_MERCHANT_ID_KEY" > certs/merchant_id.key
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run integration tests
run: php ./vendor/bin/phpunit --log-junit test-results/junit.xml test/integration
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: 'test-results/junit.xml'
check_name: 'Integration Test Report'
detailed_summary: true
fail_on_failure: true