dc740 / django-coveragepy-github-action

Run coverage.py with django test - Github Action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'

DgRosa opened this issue · comments

I have the requirements.txt on the root of the repository, what do I need to do so it shows up in actions docker.
Sorry if it's a silly question but I'm new to the Github Actions.

Thank you in advance.

Hi, did you remember to add the checkout action?

Here is a sample yaml. I save this on .github/workflow/pull-request-coverage.yml

name: Pull request coverage verification
on: [pull_request]

jobs:
  build:
    name: Greeting
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Python Django Coverage GitHub Action
        uses: dc740/django-coveragepy-github-action@0.9
        with:
          django-app: 'YOUR_DJANGO_APPLICATION_NAME_HERE'
          minimum-coverage: '40'

Right now the action should fail when any test case fails. PRs are welcome to add a minimum required percentage of passed tests, just like the one about the minimum required coverage.