Skip to content

Commit 76b1e29

Browse files
chore: CI
1 parent 8196011 commit 76b1e29

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
strategy:
14-
max-parallel: 4
14+
fail-fast: false
15+
max-parallel: 3
1516
matrix:
1617
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
1718
steps:
@@ -23,16 +24,15 @@ jobs:
2324

2425
- name: Install Dependencies
2526
run: |
26-
python -m pip install --upgrade pip
27-
pip install -r requirements-dev.txt
27+
make init
2828
2929
- name: Lint
3030
run: |
3131
make lint
3232
3333
- name: Tests
3434
run: |
35-
python -m pytest tests
35+
make pytest
3636
3737
deploy:
3838
needs: build

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.PHONY: docs
22
init:
3+
python -m pip install --upgrade pip
34
python -m pip install -r requirements-dev.txt
45

56
test:
@@ -14,6 +15,9 @@ lint:
1415
python -m isort tls_requests
1516
python -m flake8 tls_requests
1617

18+
pytest:
19+
python -m pytest tests
20+
1721
coverage:
1822
python -m pytest --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=tls_requests tests
1923

@@ -25,11 +29,11 @@ publish-test-pypi:
2529
python -m pip install 'twine>=6.0.1'
2630
python setup.py sdist bdist_wheel
2731
twine upload --repository testpypi dist/*
28-
rm -rf build dist .egg *.egg-info
32+
rm -rf build dist .egg wrapper_tls_requests.egg-info
2933

3034
publish-pypi:
3135
python -m pip install -r requirements-dev.txt
3236
python -m pip install 'twine>=6.0.1'
3337
python setup.py sdist bdist_wheel
3438
twine upload dist/*
35-
rm -rf build dist .egg *.egg-info
39+
rm -rf build dist .egg wrapper_tls_requests.egg-info

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
import tls_requests
2+
13
pytest_plugins = ['pytest_httpserver', 'pytest_asyncio']
4+
5+
6+
def pytest_configure(config):
7+
tls_requests.TLSLibrary.load()

tls_requests/models/libraries.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def from_kwargs(cls, **kwargs):
5858
class TLSLibrary:
5959
@classmethod
6060
def fetch_api(cls, version: str = None, retries: int = 3):
61+
6162
for _ in range(retries):
6263
try:
6364
response = requests.get(GITHUB_API_URL)
@@ -70,7 +71,7 @@ def fetch_api(cls, version: str = None, retries: int = 3):
7071
asset
7172
for release in releases
7273
for asset in release.assets
73-
if "xgo" in str(asset.browser_download_url)
74+
if "xgo" in str(asset.browser_download_url) and str(asset.browser_download_url).endswith(('.dylib', '.so', '.dll'))
7475
]
7576
if version is not None:
7677
for asset in assets:

0 commit comments

Comments
 (0)