-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (64 loc) · 2.03 KB
/
tests.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
name: Main Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '37 9 1 * *'
jobs:
base-unit-tests:
name: "Unit tests"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dependencies: ["lowest", "highest"]
scout-ext: ["with-scout-ext", "no-scout-ext"]
extensions: [
"",
"mongodb"
]
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
services:
mongo:
image: mongo
ports:
- 27017:27017
env:
SCOUT_APM_KEY: ${{ secrets.SCOUT_APM_KEY }}
steps:
- uses: actions/checkout@v2
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: pecl, composer:v2.1
extensions: "curl, ${{ matrix.extensions }}"
env:
fail-fast: true
# Normally, we'd just add "scoutapm" to the above extensions in shivammathur/setup-php, but libcurl appears to
# be missing wherever the extension is built (not immediately obvious), so install it first
- name: "Install scoutapm extension"
if: ${{ matrix.scout-ext == 'with-scout-ext' }}
run: |
sudo apt-get install -y libcurl4-openssl-dev
sudo mkdir -p /tmp/pear/temp
sudo pecl update-channels
yes | sudo pecl install -f scoutapm
- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --prefer-dist --no-interaction --no-progress"
- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --prefer-dist --no-interaction --no-progress"
- name: "Run PHPUnit test suite"
run: "vendor/bin/phpunit --testsuite=unit,integration"
- name: "Check for memory leaks"
run: "tests/check-memory-leaks.sh"