mirror of
https://gitlab.com/brutaldon/brutaldon
synced 2024-12-26 15:53:54 +01:00
Merge branch 'fix-default-field-warning' into 'main'
Deploy CI Pipeline for tests Closes #19 See merge request brutaldon/brutaldon!6
This commit is contained in:
commit
8b147bbc16
56
.gitlab-ci.yml
Normal file
56
.gitlab-ci.yml
Normal file
@ -0,0 +1,56 @@
|
||||
# This file is a template, and might need editing before it works on your project.
|
||||
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
||||
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
||||
# This specific template is located at:
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Django.gitlab-ci.yml
|
||||
|
||||
# Official framework image. Look for the different tagged releases at:
|
||||
# https://hub.docker.com/r/library/python
|
||||
image: python:latest
|
||||
|
||||
# Pick zero or more services to be used on all builds.
|
||||
# Only needed when using a docker container to run your tests in.
|
||||
# Check out: http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
|
||||
services:
|
||||
# - mysql:latest
|
||||
# - postgres:latest
|
||||
|
||||
variables:
|
||||
# POSTGRES_DB: database_name
|
||||
|
||||
# This folder is cached between builds
|
||||
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
|
||||
cache:
|
||||
paths:
|
||||
- ~/.cache/pip/
|
||||
|
||||
# This is a basic example for a gem or script which doesn't use
|
||||
# services such as redis or postgres
|
||||
before_script:
|
||||
- python -V # Print out python version for debugging
|
||||
# Uncomment next line if your Django app needs a JS runtime:
|
||||
# - apt-get update -q && apt-get install nodejs -yqq
|
||||
- pip install pipenv
|
||||
- pipenv install
|
||||
|
||||
# To get Django tests to work you may need to create a settings file using
|
||||
# the following DATABASES:
|
||||
#
|
||||
# DATABASES = {
|
||||
# 'default': {
|
||||
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
# 'NAME': 'ci',
|
||||
# 'USER': 'postgres',
|
||||
# 'PASSWORD': 'postgres',
|
||||
# 'HOST': 'postgres',
|
||||
# 'PORT': '5432',
|
||||
# },
|
||||
# }
|
||||
#
|
||||
# and then adding `--settings app.settings.ci` (or similar) to the test command
|
||||
|
||||
test:
|
||||
variables:
|
||||
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
|
||||
script:
|
||||
- pipenv run python manage.py test
|
@ -211,5 +211,8 @@ def CHECK_INSTANCE_URL(url, redirect):
|
||||
return redirect(RICKROLL_URL)
|
||||
|
||||
|
||||
# See https://dev.to/weplayinternet/upgrading-to-django-3-2-and-fixing-defaultautofield-warnings-518n
|
||||
DEFAULT_AUTO_FIELD='django.db.models.AutoField'
|
||||
|
||||
# Version number displayed on about page
|
||||
BRUTALDON_VERSION = "2.15.0"
|
||||
|
Loading…
Reference in New Issue
Block a user