-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (90 loc) · 3.13 KB
/
Copy pathtests.yml
File metadata and controls
110 lines (90 loc) · 3.13 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
name: Tests
on:
push:
branches: ['**']
pull_request:
branches: ['**']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test-cli:
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'no_run')
name: CLI Tests (PHP ${{ matrix.php-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# CLI tests require PHP 7.4+ because greenlion/php-sql-parser uses
# nullable type hints (?Type) which require PHP 7.1+, and we test
# from 7.4 as our primary supported range.
# Extension build tests below cover PHP 5.3-5.6 separately.
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mysqlnd
tools: composer:v2
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run SqlAnalyzer tests
run: php tests/test_sql_analyzer.php
- name: Run JobManager tests
run: php tests/test_job_manager.php
- name: Run Integration tests
run: php tests/test_integration.php
test-d1-adapter:
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'no_run')
name: D1 Adapter Tests (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ['18', '20', '22']
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Run D1 adapter tests
working-directory: d1-adapter
run: npm test
build-extension:
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'no_run')
name: Build Extension (PHP ${{ matrix.php-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['5.3', '5.4', '5.5', '5.6', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v4
- name: Setup PHP with dev tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mysqlnd
tools: phpize
ini-values: error_reporting=E_ALL
- name: Build extension
working-directory: ext/mariadb_profiler
run: |
phpize
./configure --enable-mariadb_profiler
make -j$(nproc)
- name: Verify .so is loadable
working-directory: ext/mariadb_profiler
run: |
php -d "extension=$(pwd)/modules/mariadb_profiler.so" -m | grep mariadb_profiler
- name: Show extension info
working-directory: ext/mariadb_profiler
run: |
php -d "extension=$(pwd)/modules/mariadb_profiler.so" --ri mariadb_profiler