-
Notifications
You must be signed in to change notification settings - Fork 552
107 lines (88 loc) · 2.5 KB
/
ci.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
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
name: CI
on:
- pull_request
- push
jobs:
unit-tests:
strategy:
matrix:
operating-system:
- ubuntu-latest
- windows-latest
- macos-latest
php-version:
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
name: unit-tests on php-${{ matrix.php-version }} - ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: dom, libxml, xmlwriter
coverage: xdebug
- name: Install composer dependencies
run: composer update --no-ansi --no-interaction --no-progress
- name: Run unit tests
run: php tests/run.php unit
env:
XDEBUG_MODE: coverage
e2e-tests:
strategy:
matrix:
tesseract-version:
- '3.02'
- '3.03'
- '3.04'
- '3.05'
- '4.00'
- '4.1.0'
- '4.1.1'
- '4.1.3'
- '5.0.1'
- '5.1.0'
name: e2e-tests on tesseract-${{ matrix.tesseract-version }}
runs-on: ubuntu-latest
container: quay.io/thiagoalessio/tesseract-ocr-for-php-ci:${{ matrix.tesseract-version }}
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Use insecure transport for composer on very old images
run: |
composer config --global disable-tls true
composer config --global secure-http false
composer config --global repo.packagist composer http://packagist.org
if: ${{ matrix.tesseract-version == '3.02' || matrix.tesseract-version == '3.03' }}
- name: Install dependencies
run: composer update --no-ansi --no-interaction --no-progress
- name: Run end-to-end tests
run: php tests/run.php e2e
env:
XDEBUG_MODE: coverage
code-coverage:
name: code-coverage
runs-on: ubuntu-latest
container: quay.io/thiagoalessio/tesseract-ocr-for-php-ci:5.1.0
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install composer dependencies
run: composer update --no-ansi --no-interaction --no-progress
- name: Run unit + e2e tests
run: php tests/run.php unit e2e
env:
XDEBUG_MODE: coverage
- name: Report code coverage
run: bash <(curl -s https://codecov.io/bash)