Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tdt4242-base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kristoffer Håkon Håkonsen
tdt4242-base
Commits
6a8a65e2
Commit
6a8a65e2
authored
4 years ago
by
Pernille Nødtvedt Welle-Watne
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
d9704ef3
No related branches found
No related tags found
No related merge requests found
Pipeline
#110538
failed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+51
-0
51 additions, 0 deletions
.gitlab-ci.yml
with
51 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
51
−
0
View file @
6a8a65e2
# This file is a template, and might need editing before it works on your project.
# 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
# http://docs.gitlab.com/ee/ci/yaml/README.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
-
cd backend/secfit
-
pip install -r requirements.txt
# 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
:
-
python manage.py test
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment