ymyzk / tox-gh-actions

Seamless integration of tox into GitHub Actions for tox 3 and 4
MIT License
246 stars 25 forks source link

Custom `install_command` is not run on GitHub Actions #192

Closed tbrlpld closed 8 months ago

tbrlpld commented 8 months ago

Describe the bug

The custom install_command from tox.ini seems to be ignored.

If my command depends on packages that should be installed with the install_command I get errors when running on GitHub Actions, but not locally.

To Reproduce

on: push: branches:

concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true

permissions: contents: read # to fetch code (actions/checkout)

jobs: lint: runs-on: ubuntu-latest steps:


* tox and tox-gh-actions configuration

[tox] skipsdist = True usedevelop = True

envlist = python{3.8,3.9,3.10,3.11}-django{3.2,4.1,4.2}

[gh-actions] python = 3.8: python3.8 3.9: python3.9 3.10: python3.10 3.11: python3.11

[gh-actions:env] DB = sqlite: sqlite

[testenv] install_command = python -m pip install -e ".[testing]" -U {opts} {packages}

commands_pre =

Mostly to check that the requirements are in order

python -m pip freeze

commands = coverage run -a testmanage.py test --deprecation all {posargs: -v 2}

commands_post = coverage json --data-file .coverage -o .coverage.json

basepython = python3.8: python3.8 python3.9: python3.9 python3.10: python3.10 python3.11: python3.11

deps = django3.2: Django>=3.2,<4.0 django4.0: Django>=4.0,<4.1 django4.1: Django>=4.1,<4.2 django4.2: Django>=4.2,<4.3 djangomain: git+https://github.com/django/django.git@main#egg=Django

[testenv:interactive] basepython = python3.10

commands_pre = python {toxinidir}/testmanage.py makemigrations python {toxinidir}/testmanage.py migrate python {toxinidir}/testmanage.py shell -c "from django.contrib.auth.models import User;(not User.objects.filter(username='admin').exists()) and User.objects.create_superuser('admin', 'super@example.com', 'changeme')" python {toxinidir}/testmanage.py createcachetable

commands = {posargs:python testmanage.py runserver 0.0.0.0:8020}

setenv = INTERACTIVE = 1



* Link to the GitHub Actions job if a repository is public:
  * Here is a run that failed: https://github.com/tbrlpld/laces/actions/runs/7604822530/job/20708230969#step:5:113
  * The failing dependency is `coverage`. 
  * I can also not see any logging of the install step, which makes this hard to debug. I am already running with `tox -vv`.

**Expected behavior**

The custom install command should be used to install the dependencies. 

**Additional context**

* tox: 4.11.3
* tox-gh-actions: 3.13