LuCCoelho / TDD-and-Django-studies

0 stars 0 forks source link

Install github actions #3

Closed mauriciovieira closed 1 year ago

mauriciovieira commented 1 year ago

After #2, install github actions. I suggest following a tutorial, but you'll just need something like

name: test_Django
on: [pull_request, push] # activates the workflow when there is a push or pull request in the repo
jobs:
  test_project:
    runs-on: ubuntu-latest # operating system your code will run on
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
      - run: pip install ruff 
      - run: pip install -r requirements.txt # install all our dependencies for the project
      - run: python manage.py  test 

With something like

name: Ruff
on: [ push, pull_request ]
jobs:
  ruff:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: chartboost/ruff-action@v1
mauriciovieira commented 1 year ago

You can refer to https://github.com/mauriciovieira/willdom-blog/blob/master/.github/workflows/ruby.yml as an example. This example is much more complex and you won't need everything.