私が取り組んでいる python パッケージのコード カバレッジを生成しようとしていて、これを行うための GitHub アクションを作成しました。これはcodecov-actionを使用します。ワークフローは次のようになります。
name: Code Coverage
on: [push]
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.7
- name: Install dependencies
run: |
pip install pytest
pip install pytest-cov
pip install -r requirements.txt
- name: Generate coverage report
run: |
pytest --cov=./epispot --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
verbose: true
fail_ci_if_error: true
実行するとエラーが出力されます。エラーはこちらで確認できます。Pytest はエラー コード 5 (テストが見つからなかったことを意味します) を出力しますが、自分のコンピューターで実行すると、正しく動作します。なぜこうなった?