-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.52 KB
/
proxy_integration_tests.yml
File metadata and controls
49 lines (39 loc) · 1.52 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
# 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
on:
pull_request:
permissions:
contents: read
jobs:
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install system dependencies (pycurl)
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
- name: Install package and test dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install urllib3 requests aiohttp httpx cloudscraper autoscraper pycurl
- 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
env:
PROXY_URL: ${{ secrets.PROXY_URL }}
run: python test_proxy_headers.py