Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
internewshid
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
aptivate
client-projects
internewshid
Commits
d4aaa89d
Unverified
Commit
d4aaa89d
authored
6 years ago
by
Luke Murphy
Browse files
Options
Downloads
Patches
Plain Diff
Use APC to run the CI.
parent
9b7a6831
No related branches found
No related tags found
1 merge request
!72
Use APC to run the CI.
Pipeline
#2466
failed
6 years ago
Stage: test
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+12
-29
12 additions, 29 deletions
.gitlab-ci.yml
Makefile
+0
-25
0 additions, 25 deletions
Makefile
internewshid/local_settings.py.dev
+9
-4
9 additions, 4 deletions
internewshid/local_settings.py.dev
internewshid/local_settings.py.gitlab
+0
-32
0 additions, 32 deletions
internewshid/local_settings.py.gitlab
with
21 additions
and
90 deletions
.gitlab-ci.yml
+
12
−
29
View file @
d4aaa89d
---
stages
:
-
checks
-
style
-
test
image
:
python:2
image
:
aptivate/pyenv-pythons:latest
services
:
-
mysql:5.7
variables
:
MYSQL_ROOT_PASSWORD
:
internewshid
MYSQL_DATABASE
:
internewshid
MYSQL_ROOT_PASSWORD
:
passw0rd
DJANGO_SECRET_KEY
:
'
nde2wr2r)#a*%n$!(zl8#3v_o!sp=hd9vbv%*e6atgr0dp=b(7'
APTIVATE_CLI_MYSQL_USER
:
root
APTIVATE_CLI_MYSQL_PASS
:
"
$MYSQL_ROOT_PASSWORD"
APTIVATE_CLI_MYSQL_HOST
:
mysql
before_script
:
-
pip install -U pipenv setuptools 'pip<=18.0'
# https://github.com/pypa/pipenv/issues/2924
-
ln -srf internewshid/local_settings.py.gitlab internewshid/local_settings.py
-
|
echo "SECRET_KEY = '$DJANGO_SECRET_KEY'" >> internewshid/private_settings.py
echo "DB_PASSWORD = '$MYSQL_ROOT_PASSWORD'" >> internewshid/private_settings.py
-
pipenv sync --dev
-
apt update && apt install -y node-less
checks
:
stage
:
checks
script
:
-
make checks
style
:
stage
:
style
allow_failure
:
true
script
:
-
make style
-
pip install pipenv aptivate-cli
-
apc deploy --no-input
test
:
stage
:
test
gitlab-ci
:
script
:
-
make test
-
apc checks
-
apc pylava
-
apc isort
-
apc pytest -v --cov
This diff is collapsed.
Click to expand it.
Makefile
+
0
−
25
View file @
d4aaa89d
...
...
@@ -6,28 +6,3 @@ apply-isort:
--apply
\
--settings-path
=
setup.cfg
.PHONY
:
apply-isort
isort
:
@$(
PIPENV
)
isort
\
--quiet
\
--recursive
\
--check-only
\
--diff
\
--settings-path
=
setup.cfg
.PHONY
:
isort
pylava
:
@
ls
-d
*
/ | xargs
$(
PIPENV
)
pylava
.PHONY
:
pylava
checks
:
$(
PIPENV
)
python manage.py check
$(
PIPENV
)
python manage.py makemigrations
--check
.PHONY
:
checks
style
:
isort pylava
.PHONY
:
style
test
:
$(
PIPENV
)
pytest
-v
--cov
.PHONY
:
test
This diff is collapsed.
Click to expand it.
internewshid/local_settings.py.dev
+
9
−
4
View file @
d4aaa89d
from __future__ import unicode_literals, absolute_import
import private_settings
from os import environ
from private_settings import DB_PASSWORD
DEBUG = True
ASSETS_DEBUG = DEBUG
ASSETS_AUTO_BUILD = DEBUG
DJANGOJS_DEBUG = DEBUG
# `MYSQL_DATABASE` and `MYSQL_ROOT_PASSWORD` are used for the CI
# https://hub.docker.com/_/mysql/
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'internewshid',
'USER': 'internewshid',
'PASSWORD': private_settings.DB_PASSWORD,
'NAME': environ.get('MYSQL_DATABASE', 'internewshid'),
'USER': environ.get('APTIVATE_CLI_MYSQL_USER', 'internewshid'),
'HOST': environ.get('APTIVATE_CLI_MYSQL_HOST', 'localhost'),
'PASSWORD': environ.get('MYSQL_ROOT_PASSWORD', DB_PASSWORD),
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
...
...
This diff is collapsed.
Click to expand it.
internewshid/local_settings.py.gitlab
deleted
100644 → 0
+
0
−
32
View file @
9b7a6831
from __future__ import unicode_literals, absolute_import
import private_settings
DEBUG = True
ASSETS_DEBUG = DEBUG
ASSETS_AUTO_BUILD = DEBUG
DJANGOJS_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'internewshid',
'USER': 'root',
'PASSWORD': private_settings.DB_PASSWORD,
'HOST': 'mysql',
'PORT': '3306',
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
}
}
}
EMAIL_HOST = 'localhost'
SITE_HOSTNAME = 'localhost:8000'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
}
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