Package Installation failing on github actions. #150
-
Describe the bug
To Reproduce
name: Tests
on:
- push
- pull_request
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.9.13"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install tox tox-gh-actions certifi
- name: Test with tox
run: tox
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build Image
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: false
[tox]
minversion = 3.25.1
envlist = py39
isolated_build = true
[gh-actions]
python =
3.9.13: py39
[testenv]
setenv =
PYTHONPATH = {toxinidir}/src/
DJANGO_SETTINGS_MODULE = app.settings.test
DJANGO_SECRET_KEY = ABCdefGHIjklMNOpqrSTUvwxYZ123456789$%*
DJANGO_DEBUG=True
BROKER_URL='Empty'
BROKER_TRANSPORT='redis'
PDM_IGNORE_SAVED_PYTHON="1"
REDIS_HOST=redis
REDIS_PORT=6379
ACCESS_TOKEN_LIFETIME_MINUTES=15
REFRESH_TOKEN_LIFETIME_DAYS=1
deps =
pdm
setuptools
wheel
commands =
pdm install --dev
pdm run python src/manage.py collectstatic --noinput
pdm run pytest --basetemp={envtmpdir}
pdm run black src --check
pdm run mypy src
[tool.mypy]
mypy_path = "src"
check_untyped_defs = true
disallow_any_generics = true
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
no_implicit_reexport = true
allow_redefinition = true
[tool.black]
line-length = 100
extend-exclude = """
migrations
"""
[tool.isort]
profile = "black"
[tool.pdm]
[[tool.pdm.source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[tool.pdm.scripts]
_.env_file = ".env.dev"
collectstatic.cmd = "python manage.py collectstatic --noinput"
makemigrations.cmd = "python manage.py makemigrations"
migrate.cmd = "python manage.py migrate"
server.cmd = "python manage.py runserver"
createsuperuser.cmd = "python manage.py createsuperuser"
makemessages.shell = "cd src && pdm run python manage.py makemessages"
compilemessages.shell = "cd src && pdm run python manage.py compilemessages"
tests = { env_file = ".env.test", shell = "rm -r test_media || true && mkdir test_media && coverage run --source=src/ --rcfile=.coveragerc -m pytest tests/ && coverage html && google-chrome htmlcov/index.html"}
[tool.pdm.dev-dependencies]
dev = [
"black==22.3.0",
"pytest==7.0.1",
"pytest-django>=4.5.2",
"mypy==0.961",
"django-debug-toolbar>=3.5",
"coverage==6.3.2",
"pre-commit>=2.19.0",
"isort>=5.10.1",
"pytest-socket>=0.5.1",
"model-bakery>=1.9.0",
]
[build-system]
requires = ["pdm-pep517>=1.0.0"]
build-backend = "pdm.pep517.api"
[tool.pytest.ini_options]
testpaths = [
"tests/",
]
addopts = "--rootdir ./tests --disable-socket"
[project]
name = "cashopera"
version = "0.1.0"
description = "Cash Opera Django App"
authors = [
{name = "Leandro de Souza", email = "[email protected]"},
]
dependencies = [
"Django==4.1",
"djangorestframework>=3.13.1",
"celery[redis]>=5.2.7",
"whitenoise>=6.2.0",
"django-environ>=0.9.0",
"django-jazzmin>=2.5.0",
"drf-spectacular[sidecar]>=0.22.1",
"django-cors-headers>=3.13.0",
"psycopg2-binary>=2.9.3",
"setuptools>=62.6.0",
"channels>=3.0.5",
"channels-redis>=3.4.0",
"daphne>=3.0.2",
"sendgrid>=6.9.7",
"django-storages>=1.12.3",
"Pillow>=9.2.0",
"flower>=1.1.0",
"validate-docbr>=1.10.0",
"phonenumbers>=8.12.54",
"boto3>=1.24.76",
"requests>=2.28.1",
"beautifulsoup4>=4.11.1",
"django-filter>=22.1",
]
requires-python = ">=3.9.13"
license = {text = "MIT"}
[project.optional-dependencies] Since the repository i'm working on is not public, here's the downloaded log file from the failed action. Expected behavior Additional context I had take a look in some in this issue on my way here: tox-dev/tox - tox fails due to ssl #809 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello @leandrodesouzadev, thanks for filing an issue with a concrete example. Though, did you find any clue that this is caused by an issue with tox-gh-actions not tox itself? tox-gh-actions doesn't affect CA at all so I feel this may be rather an issue with tox or caused by the recent tox 3 to 4 upgrade. |
Beta Was this translation helpful? Give feedback.
-
Yeah, that's was the cause. The version that still works is: |
Beta Was this translation helpful? Give feedback.
Yeah, that's was the cause.
Guess i should had locked the tox dependency to a specific version (as we always should).
The version that still works is:
tox==3.28.0