mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
tests: use source distribution of pycurl so that it supports more compression types
Cross-os binary distribution is EVIL!
This commit is contained in:
parent
17e351f825
commit
6759d2f206
2 changed files with 8 additions and 6 deletions
13
.github/workflows/tests.yaml
vendored
13
.github/workflows/tests.yaml
vendored
|
@ -42,11 +42,6 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.deps }}-
|
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.deps }}-
|
||||||
${{ runner.os }}-${{ env.cache-name }}-
|
${{ runner.os }}-${{ env.cache-name }}-
|
||||||
- name: workaround pycurl wheel
|
|
||||||
if: ${{ contains(matrix.deps, 'pycurl') }}
|
|
||||||
run: |
|
|
||||||
sudo mkdir -p /etc/pki/tls/certs
|
|
||||||
sudo ln -s /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt
|
|
||||||
|
|
||||||
- name: Install pycurl deps
|
- name: Install pycurl deps
|
||||||
if: ${{ contains(matrix.deps, 'pycurl') }}
|
if: ${{ contains(matrix.deps, 'pycurl') }}
|
||||||
|
@ -56,6 +51,14 @@ jobs:
|
||||||
# werkzeug is pinned for httpbin compatibility https://github.com/postmanlabs/httpbin/issues/673
|
# werkzeug is pinned for httpbin compatibility https://github.com/postmanlabs/httpbin/issues/673
|
||||||
- name: Install Python deps
|
- name: Install Python deps
|
||||||
run: pip install -U ${{ matrix.deps }} pytest 'pytest-asyncio>=0.24' pytest-httpbin pytest-rerunfailures structlog tomli platformdirs lxml jq 'werkzeug<2.1' awesomeversion
|
run: pip install -U ${{ matrix.deps }} pytest 'pytest-asyncio>=0.24' pytest-httpbin pytest-rerunfailures structlog tomli platformdirs lxml jq 'werkzeug<2.1' awesomeversion
|
||||||
|
# don't use binary distribution because:
|
||||||
|
# hardcoded cacert path doesn't work on Ubuntu (should have been resolved?)
|
||||||
|
# limited compression support (only deflate & gzip)
|
||||||
|
- name: Install pycurl
|
||||||
|
if: ${{ contains(matrix.deps, 'pycurl') }}
|
||||||
|
run: |
|
||||||
|
pip uninstall -y pycurl
|
||||||
|
pip install -U pycurl --no-binary :all:
|
||||||
- name: Decrypt keys
|
- name: Decrypt keys
|
||||||
env:
|
env:
|
||||||
KEY: ${{ secrets.KEY }}
|
KEY: ${{ secrets.KEY }}
|
||||||
|
|
|
@ -33,7 +33,6 @@ def setup_curl(curl):
|
||||||
|
|
||||||
if SSL_CERT_FILE:
|
if SSL_CERT_FILE:
|
||||||
curl.setopt_string(pycurl.CAINFO, SSL_CERT_FILE)
|
curl.setopt_string(pycurl.CAINFO, SSL_CERT_FILE)
|
||||||
# some servers insist sending us compressed content
|
|
||||||
curl.setopt_string(pycurl.ACCEPT_ENCODING, "")
|
curl.setopt_string(pycurl.ACCEPT_ENCODING, "")
|
||||||
|
|
||||||
class TornadoSession(BaseSession):
|
class TornadoSession(BaseSession):
|
||||||
|
|
Loading…
Add table
Reference in a new issue