-
Notifications
You must be signed in to change notification settings - Fork 4
120 lines (115 loc) · 3.87 KB
/
_test-integrations.yml
File metadata and controls
120 lines (115 loc) · 3.87 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#
# Run integration tests.
#
name: Integration Test
on:
workflow_call:
workflow_dispatch:
env:
MINDEE_ACCOUNT_SE_TESTS: ${{ secrets.MINDEE_ACCOUNT_SE_TESTS }}
MINDEE_ENDPOINT_SE_TESTS: ${{ secrets.MINDEE_ENDPOINT_SE_TESTS }}
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
WORKFLOW_ID: ${{ secrets.WORKFLOW_ID_SE_TESTS }}
MINDEE_V2_API_KEY: ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }}
MINDEE_V2_FAILURE_WEBHOOK_ID: ${{ secrets.MINDEE_V2_SE_TESTS_WEBHOOK_ID }}
MINDEE_V2_SE_TESTS_FAILURE_WEBHOOK_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FAILURE_WEBHOOK_ID }}
MINDEE_V2_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_BLANK_PDF_URL: ${{ secrets.MINDEE_V2_SE_TESTS_BLANK_PDF_URL }}
MINDEE_V2_CLASSIFICATION_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID }}
MINDEE_V2_CROP_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CROP_MODEL_ID }}
MINDEE_V2_OCR_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_OCR_MODEL_ID }}
MINDEE_V2_SPLIT_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID }}
jobs:
integration-tests-ubuntu:
name: Run Integration Tests on Ubuntu
timeout-minutes: 30
strategy:
max-parallel: 2
matrix:
php-version:
- 8.1
- 8.5
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Ghostscript
run: |
sudo apt-get update
sudo apt-get install -y ghostscript
- name: Set up php ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: curl, fileinfo, json, imagick
- uses: ramsey/composer-install@v2
- name: Change ImageMagick security policy on Ubuntu
run: |
DQT='"'
SRC="rights=${DQT}none${DQT} pattern=${DQT}PDF${DQT}"
RPL="rights=${DQT}read|write${DQT} pattern=${DQT}PDF${DQT}"
sudo sed -i "s/$SRC/$RPL/" /etc/ImageMagick-6/policy.xml
- name: Unit testing with phpunit
run: |
./vendor/bin/phpunit -c tests/functional.xml
# MacOS testing disabled because of capricious GS/ImageMagick/Homebrew behaviors
# integration-tests-macos:
# name: Run Integration Tests on MacOS
# timeout-minutes: 30
# strategy:
# max-parallel: 2
# matrix:
# php-version:
# - 8.1
# - 8.5
# runs-on: "macos-latest"
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# - name: Set up php ${{ matrix.php-version }}
# uses: shivammathur/setup-php@v2
# env:
# phpts: zts
# with:
# php-version: ${{ matrix.php-version }}
# extensions: curl, fileinfo, json, imagick
# - name: Install ImageMagick
# run: |
# brew update
# brew install imagemagick
# - uses: ramsey/composer-install@v2
# - name: Unit testing with phpunit
# run: |
# ./vendor/bin/phpunit -c tests/functional.xml
#
integration-tests-windows:
name: Run Integration Tests on Windows
timeout-minutes: 30
strategy:
max-parallel: 2
matrix:
php-version:
- 8.1
- 8.5
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Ghostscript
run: choco install ghostscript --version 10.03.1 -y
- name: Set up php ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
env:
phpts: zts
with:
php-version: ${{ matrix.php-version }}
extensions: curl, fileinfo, json, imagick
- name: Install Ghostscript
run: choco install ghostscript -y
- uses: ramsey/composer-install@v2
- name: Unit testing with phpunit
run: |
./vendor/bin/phpunit -c tests/functional.xml