-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathproxy_integration_tests_python.yml
More file actions
67 lines (56 loc) · 2.12 KB
/
Copy pathproxy_integration_tests_python.yml
File metadata and controls
67 lines (56 loc) · 2.12 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
# 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 (Python)
on:
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
changes:
runs-on: ubuntu-latest
outputs:
relevant: ${{ steps.filter.outputs.relevant }}
steps:
- name: Detect Python changes
id: filter
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v3
with:
filters: |
relevant:
- "python/**"
- ".github/workflows/proxy_integration_tests_python.yml"
integration:
needs: changes
if: needs.changes.outputs.relevant == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6.0.2 (Node 24)
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6.2.0 (Node 24)
with:
# Pin for reproducible dependency wheels (pycurl, etc.); adjust as needed.
python-version: "3.12"
- name: Install system dependencies (pycurl)
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
- name: Install example dependencies
run: |
python -m pip install --upgrade pip
pip install -r python/requirements.txt
- 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: python
env:
PROXY_URL: ${{ secrets.PROXY_URL }}
run: python run_tests.py