【发布时间】:2020-12-14 23:39:06
【问题描述】:
我正在尝试使用 GitHub Actions 测试我的包,该包在 conda 环境中运行。在本地一切正常。但是在 GitHub Actions 上,它显示 pytest: command not found 和 this workflow file:
name: Build and Test [Python 3.6, 3.7]
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Setup Miniconda using Python ${{ matrix.python-version }}
uses: goanpeca/setup-miniconda@v1
with:
activate-environment: microdf
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: Build
shell: bash -l {0}
run: |
pip install -e .
- name: Run tests
run: |
pytest
在运行pytest 之前,我尝试从conda 环境和instead running pip install pytest 中删除pytest,但这给出了不同的错误:error: invalid command 'bdist_wheel'。
【问题讨论】:
标签: python pytest conda github-actions