-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathproxy_integration_tests_php.yml
More file actions
64 lines (54 loc) · 1.86 KB
/
Copy pathproxy_integration_tests_php.yml
File metadata and controls
64 lines (54 loc) · 1.86 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
# Integration tests against a real proxy (PROXY_URL). Add repository secret PROXY_URL
# under Settings → Secrets and variables → Actions, then mark this workflow as a required
# status check under branch protection (pull_request events only receive secrets for PRs
# from the same repository, not from forks).
name: Proxy integration tests (PHP)
on:
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
changes:
runs-on: ubuntu-latest
outputs:
relevant: ${{ steps.filter.outputs.relevant }}
steps:
- name: Detect PHP changes
id: filter
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
with:
filters: |
relevant:
- "php/**"
- ".github/workflows/proxy_integration_tests_php.yml"
integration:
needs: changes
if: needs.changes.outputs.relevant == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 (Node 24)
with:
persist-credentials: false
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
extensions: curl
coverage: none
- name: Install Composer dependencies
working-directory: php
run: composer install --no-interaction --prefer-dist
- name: Require PROXY_URL Actions secret
env:
PROXY_URL: ${{ secrets.PROXY_URL }}
run: |
if [ -z "${PROXY_URL}" ]; then
echo "::error::PROXY_URL is not set. Add a repository (or environment) secret named PROXY_URL under Settings → Secrets and variables → Actions."
exit 1
fi
- name: Run integration tests
working-directory: php
env:
PROXY_URL: ${{ secrets.PROXY_URL }}
run: php run_tests.php