-
Notifications
You must be signed in to change notification settings - Fork 69
75 lines (71 loc) · 2.41 KB
/
phpt.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
name: Execute agent with phpt tests delivered with PHP source code
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * *'
permissions:
contents: read
jobs:
build:
uses: ./.github/workflows/build.yml
run-phpt-tests:
runs-on: ubuntu-latest
needs:
- build
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
steps:
# - uses: actions/checkout@v4
# - name: Fetch and extract latest release of apm-agent-php
# run: |
# wget https://github.com/elastic/apm-agent-php/releases/latest/download/apm-agent-php-linux-x86-64.tar -O /tmp/apm-agent-php-linux-x86-64.tar
# mkdir -p agent/native/_build/linux-x86-64-release/ext/
# cd agent/native/_build/linux-x86-64-release/ext/
# tar --wildcards --strip-components 5 -xf /tmp/apm-agent-php-linux-x86-64.tar ./opt/elastic/apm-agent-php/extensions/elastic_apm*
# cd -
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: package-parts-linux-x86-64
path: |
agent/native/_build/linux-x86-64-release/ext/
agent/native/_build/linux-x86-64-release/loader/code/
- name: Run phpt tests from PHP source code
continue-on-error: true
run: |
VERSION=${{ matrix.php-version }}
VERSION_SHORT=${VERSION//./}
cd agent/extension_phpt_test
docker compose build elasticsearch apm-server phpt_${VERSION_SHORT}
docker compose up -d elasticsearch apm-server
docker compose run phpt_${VERSION_SHORT}
docker compose stop
# exit 0
- if: success() || failure()
name: Change results ownership
continue-on-error: true
run: |
sudo chmod -R 777 agent/extension_phpt_test/results
sudo chown -R $(id -u):$(id -g) agent/extension_phpt_test/results
- if: success() || failure()
uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: phpt-test-results-${{ matrix.php-version }}
path: agent/extension_phpt_test/results
if-no-files-found: error
- if: success() || failure()
name: Test summary
continue-on-error: true
run:
cat agent/extension_phpt_test/results/${{ matrix.php-version }}/*tests-result.md >> $GITHUB_STEP_SUMMARY