Skip to content

Commit

Permalink
Merge branch 'add_auth' into 'dev'
Browse files Browse the repository at this point in the history
Add CI/CD file

See merge request project-thea/project-thea-api!3
  • Loading branch information
erssebaggala committed Sep 12, 2024
2 parents 305f7e9 + b7a4226 commit 7ed1820
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
image: python:3.11.9

stages:
- build
- test

build:
stage: build
script:
- echo "build"

test:
stage: test
before_script:
- python --version ; pip --version # For debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install tox
- pip install -r requirements.txt
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
script:
- tox
16 changes: 16 additions & 0 deletions thea/settings_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from .settings import *

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}

CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
}

DEBUG = False
10 changes: 10 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[tox]
envlist = py311

[testenv]
setenv =
DJANGO_SETTINGS_MODULE = thea.settings_test
deps =
-rrequirements.txt
commands =
python manage.py test

0 comments on commit 7ed1820

Please sign in to comment.