Тестирование проекта Django с помощью pytest
Все локальные tests
успешно прошли с pytest
в моей виртуальной среде.
Однако, когда я создаю рабочий процесс (конвейер) в github actions, все тесты не проходят.
Не могли бы вы мне помочь?
Вот мой трубопровод:
name: Django CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9]
steps:
# Checkout the Github repo
- uses: actions/checkout@v3
# Install Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
# Install project dependencies
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Move into the django project folder (Sigma) and run pytest
- name: Run Tests with pytest
working-directory: .
run: |
pip install pytest
pytest -v