Skip to content

enhancement: Added Django tests to github actions #7

enhancement: Added Django tests to github actions

enhancement: Added Django tests to github actions #7

name: Code style checking
on: push
jobs:
ruff-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Check code with ruff
uses: chartboost/ruff-action@v1
with:
args: check
poetry-checks-and-django-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: gwardiahub
POSTGRES_PASSWORD: root
POSTGRES_USER: root
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Run image
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.8
- name: Check dependencies with poetry
run: |
poetry install
poetry update
poetry check
- name: Run Django tests
run: poetry run python manage.py test