我有一个项目布局如下:
ProjectRoot
|
\---------CoreImplelemntation
| |
| \--CoreSourceFile1.py
| \--Test_CoreSourceFile1.py
|
\---------WebUIThatReferencesCoreImplentation
|
\--WebSourceFile1.py
\--Test_WebSourceFile1.py
我可以在本地运行(从项目的根文件夹)pipenv run pytest,我的所有测试都在这些子目录中被发现并执行。
然而,当我尝试在 github 的工作流程中执行此操作时,以下所有情况都导致没有运行测试:
- name: Test with pytest
run: |
pytest
- name: Test with pytest
run: |
pipenv run pytest
- name: Test with pytest
run: |
pipenv run pytest .
每次输出看起来像这样:
Run pipenv run pytest .
Creating a virtualenv for this project...
Pipfile: /home/runner/work/ed-scout/ed-scout/Pipfile
Using /opt/hostedtoolcache/Python/3.7.8/x64/bin/python3.7m (3.7.8) to create virtualenv...
created virtual environment CPython3.7.8.final.0-64 in 452ms
creator CPython3Posix(dest=/home/runner/.local/share/virtualenvs/ed-scout-bRIm7jsM, clear=False, global=False)
seeder FromAppData(download=False, pip=bundle, wheel=bundle, setuptools=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
added seed packages: pip==20.2.2, setuptools==49.6.0, wheel==0.35.1
activators PythonActivator,FishActivator,XonshActivator,CShellActivator,PowerShellActivator,BashActivator
Successfully created virtual environment!
Virtualenv location: /home/runner/.local/share/virtualenvs/ed-scout-bRIm7jsM
============================= test session starts ==============================
platform linux -- Python 3.7.8, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
rootdir: /home/runner/work/ed-scout/ed-scout
collected 0 items
============================ no tests ran in 0.03s =============================
##[error]Process completed with exit code 5.
工作流文件如下:https ://github.com/joncage/ed-scout/pull/18/files
是否有一些我缺少的魔法来让它运行或询问这里出了什么问题的方法?
蓝山帝景
相关分类