Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
django-hope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CSTB
django-hope
Commits
b6f81f6b
Commit
b6f81f6b
authored
Jan 04, 2018
by
Timothée Mazzucotelli
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10-improve-ci' into 'master'
Resolve "Improve CI" (
#10
) Closes
#10
See merge request
!6
parents
20ea2f0c
07bffa05
Pipeline
#1602
failed with stages
in 9 minutes and 26 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
114 additions
and
50 deletions
+114
-50
.gitlab-ci.yml
.gitlab-ci.yml
+110
-41
tox.ini
tox.ini
+4
-9
No files found.
.gitlab-ci.yml
View file @
b6f81f6b
# Setup some variables and caches
variables
:
PIP_CACHE_DIR
:
"
$CI_PROJECT_DIR/pip-cache"
cache
:
paths
:
-
"
$CI_PROJECT_DIR/pip-cache"
key
:
"
$CI_PROJECT_ID"
# Declare the stages
stages
:
-
prepare
-
lint
-
test
-
build
-
deploy
# PREPARE stage
prepare
:
stage
:
prepare
image
:
python:3.5
script
:
-
pip install -U pip setuptools tox detox
-
pip install -r requirements.txt
-
pip install -r docs/requirements.txt
# CHECK stage
setup
:
image
:
python:3.5
stage
:
lint
before_script
:
-
pip install tox
script
:
tox -e setup
safety
:
image
:
python:3.5
stage
:
lint
before_script
:
-
pip install tox
script
:
tox -e safety
style
:
image
:
python:3.5
stage
:
lint
before_script
:
-
pip install tox
script
:
tox -e style
allow_failure
:
true
docs
:
image
:
python:3.5
stage
:
lint
before_script
:
-
apt-get update && apt-get install -y python-enchant
-
pip install tox
script
:
tox -e docs
allow_failure
:
true
# TEST stage
py34-django111
:
image
:
python:3.4
stage
:
test
before_script
:
-
pip install tox
-
pip install tox
script
:
tox -e py34-django111
artifacts
:
paths
:
-
.coverage.*
py35-django111
:
image
:
python:3.5
stage
:
test
before_script
:
-
pip install tox
-
pip install tox
script
:
tox -e py35-django111
artifacts
:
paths
:
-
.coverage.*
py36-django111
:
image
:
python:3.6
stage
:
test
before_script
:
-
pip install tox
-
pip install tox
script
:
tox -e py36-django111
artifacts
:
paths
:
-
.coverage.*
py37-django111
:
image
:
python:3.7-rc-stretch
stage
:
test
before_script
:
-
pip install tox
-
pip install tox
script
:
tox -e py37-dev-django111
artifacts
:
paths
:
-
.coverage.*
py34-django20
:
image
:
python:3.4
stage
:
test
before_script
:
-
pip install tox
-
pip install tox
script
:
tox -e py34-django20
artifacts
:
paths
:
-
.coverage.*
py35-django20
:
image
:
python:3.5
stage
:
test
before_script
:
-
pip install tox
-
pip install tox
script
:
tox -e py35-django20
artifacts
:
paths
:
-
.coverage.*
py36-django20
:
image
:
python:3.6
stage
:
test
before_script
:
-
pip install tox
-
pip install tox
script
:
tox -e py36-django20
artifacts
:
paths
:
-
.coverage.*
py37-django20
:
image
:
python:3.7-rc-stretch
stage
:
test
before_script
:
-
pip install tox
-
pip install tox
script
:
tox -e py37-dev-django20
artifacts
:
paths
:
-
.coverage.*
setup
:
image
:
python:3.5
stage
:
lint
before_script
:
-
pip install tox
script
:
tox -e setup
safety
:
image
:
python:3.5
stage
:
lint
before_script
:
-
pip install tox
script
:
tox -e safety
style
:
image
:
python:3.5
stage
:
lint
before_script
:
-
pip install tox
script
:
tox -e style
allow_failure
:
true
docs
:
image
:
python:3.5
stage
:
lint
before_script
:
-
apt-get update && apt-get install -y python-enchant
-
pip install tox
script
:
tox -e docs
allow_failure
:
true
# BUILD stage
build
:
image
:
docker:latest
services
:
...
...
@@ -100,6 +145,7 @@ build:
stage
:
build
script
:
echo "Build Docker images"
# DEPLOY stage
deploy_staging
:
stage
:
deploy
script
:
...
...
@@ -120,3 +166,26 @@ deploy_prod:
when
:
manual
only
:
-
master
pages
:
stage
:
deploy
dependencies
:
-
py34-django111
-
py35-django111
-
py36-django111
-
py37-django111
-
py34-django20
-
py35-django20
-
py36-django20
-
py37-django20
before_script
:
-
pip install tox
script
:
-
tox -e report
-
mv htmlcov/ public/
artifacts
:
paths
:
-
public
expire_in
:
30 days
only
:
-
master
tox.ini
View file @
b6f81f6b
[tox]
envlist
=
clean,setup,safety,style,docs,
py34-django111,
py34-django20,
py35-django111,
py35-django20,
py36-django111,
py36-django20,
py37-dev-django111,
py37-dev-django20,
pypy-django111,
pypy-django20,
report
skip_missing_interpreters
=
true
...
...
@@ -18,7 +14,7 @@ skip_missing_interpreters = true
setenv
=
PYTHONPATH
=
{toxinidir}:{toxinidir}/src:{toxinidir}/tests
PYTHONUNBUFFERED
=
yes
commands
=
{posargs:pytest --cov --cov-report=term-missing -vv runtests.py tests}
commands
=
{posargs:pytest --cov --cov-
append --cov-
report=term-missing -vv runtests.py tests}
deps
=
django111:
Django>=1.11,<1.12
django20:
Django>=2.0,<2.1
...
...
@@ -32,7 +28,7 @@ whitelist_externals = tox
[testenv:test]
description
=
Run all the Python/Django test environments.
skip_install
=
true
commands
=
tox -e py3
4-django111,py34-django20,py35-django111,py35-django20,py36-django111,py36-django20,py37-dev-django111,py37-dev-django20,pypy-django18,pypy-django19,pypy-django111,pypy-django20,
commands
=
tox -e py3
5-django111,py35-django20,py36-django111,py36-django20,py37-dev-django111,py37-dev-django20
tox
-e
report
[testenv:dtest]
...
...
@@ -40,7 +36,7 @@ description = Run all the Python/Django test environments in parallel.
skip_install
=
true
deps
=
detox
commands
=
detox
-e
py3
4-django111,py34-django20,py35-django111,py35-django20,py36-django111,py36-django20,py37-dev-django111,py37-dev-django20,pypy-django18,pypy-django19,pypy-django111,pypy-django20,
detox
-e
py3
5-django111,py35-django20,py36-django111,py36-django20,py37-dev-django111,py37-dev-django20
tox
-e
report
[testenv:detox]
...
...
@@ -48,7 +44,7 @@ description = Run all the environments in parallel.
skip_install
=
true
deps
=
detox
commands
=
detox
-e
clean,setup,safety,style,docs,py3
4-django111,py34-django20,py35-django111,py35-django20,py36-django111,py36-django20,py37-dev-django111,py37-dev-django20,pypy-django18,pypy-django19,pypy-django111,pypy-django20,
detox
-e
clean,setup,safety,style,docs,py3
5-django111,py35-django20,py36-django111,py36-django20,py37-dev-django111,py37-dev-django20
tox
-e
report
[testenv:check]
...
...
@@ -133,4 +129,3 @@ commands =
coverage
report
coverage
xml
--ignore-errors
python-codacy-coverage
[]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment