Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github Action with Pytest

I am getting error that pytest command not found. Below is my action file. I am using pipfile.lock to install dependencies.

name: Python application

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python 3.8
      uses: actions/setup-python@v1
      with:
        python-version: 3.7
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install pipenv
        pipenv install --dev
    - name: Test with pytest
      run: |
        pytest
like image 209
device Avatar asked Oct 14 '25 07:10

device


1 Answers

Looks like you never actually installed pytest.

Try adding a pip install to your pytest section:

- name: Test with pytest
  run: |
    pip install pytest
    pytest
like image 59
crystalattice Avatar answered Oct 16 '25 21:10

crystalattice