I am new to tox and GitHub actions and I'm facing a problem. tox testenv commands don't seem to run on a self-hosted server. This is the result of pushing a commit to the github repository:
tox
...
___________________________________ summary ____________________________________
congratulations :)
however, expected result should look like this:
tox
...
============================== 1 passed in 0.17s ==============================
___________________________________ summary ___________________________________
py310: commands succeeded
congratulations :)
my tox.ini file:
[tox]
minversion = 3.10
envlist = py310
isolated_build = true
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
commands =
pytest --basetemp={envtmpdir}
github workflows file
name: Tests
on:
- push
- pull_request
jobs:
test:
runs-on: self-hosted
strategy:
matrix:
python-version: ['3.10.6']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test with tox
run: |
tox
however, the code above works properly on a virtual machine hosted by GitHub. (runs-on: ubuntu-latest) My server runs on Ubuntu 20.04.4 LTS. Is there anything I am doing wrong, how do i fix that?