-
Notifications
You must be signed in to change notification settings - Fork 99
91 lines (79 loc) · 2.34 KB
/
Copy pathci.yml
File metadata and controls
91 lines (79 loc) · 2.34 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
name: CI
on:
pull_request:
push:
branches:
- master
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: PHP ${{ matrix.php }} / ${{ matrix.driver }} / ${{ matrix.search_build }}
runs-on: ubuntu-latest
timeout-minutes: 30
continue-on-error: ${{ matrix.search_build == 'SPHINX3' }}
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0', '8.1']
driver: [mysqli, pdo]
search_build: [SPHINX2, SPHINX3, MANTICORE]
env:
DRIVER: ${{ matrix.driver }}
SEARCH_BUILD: ${{ matrix.search_build }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: mysqli, pdo_mysql, mbstring
tools: composer:v2
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libodbc1 \
gcc \
g++ \
make \
autoconf \
automake \
libtool \
pkg-config \
wget \
tar
- name: Install search engine
run: |
mkdir -p "$HOME/search"
pushd "$HOME/search"
"$GITHUB_WORKSPACE/tests/install.sh"
popd
- name: Install dependencies
run: composer update --prefer-dist --no-interaction
- name: Prepare autoload
run: composer dump-autoload
- name: Start search daemon
run: |
cd tests
"$GITHUB_WORKSPACE/tests/run.sh"
- name: Run tests
run: |
EXCLUDE_GROUP=""
if [ "$SEARCH_BUILD" != "MANTICORE" ]; then
EXCLUDE_GROUP="--exclude-group=Manticore"
fi
./vendor/bin/phpunit --configuration "tests/travis/${DRIVER}.phpunit.xml" --coverage-text $EXCLUDE_GROUP
- name: Upload debug artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: ci-debug-php${{ matrix.php }}-${{ matrix.driver }}-${{ matrix.search_build }}
if-no-files-found: ignore
path: |
tests/searchd.log
tests/searchd.pid
tests/data/*