forked from project-thea/thea-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI/CD file See merge request project-thea/project-thea-api!3
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |