Drone CI shared venv
This commit is contained in:
parent
9c24eb6b61
commit
4dfa245cc9
24
.drone.yml
24
.drone.yml
@ -1,6 +1,3 @@
|
|||||||
kind: pipeline
|
|
||||||
type: kubernetes
|
|
||||||
name: test
|
|
||||||
global-variables:
|
global-variables:
|
||||||
python_image: &python_image python:3.9-alpine
|
python_image: &python_image python:3.9-alpine
|
||||||
environment: &default_environment
|
environment: &default_environment
|
||||||
@ -27,24 +24,31 @@ global-variables:
|
|||||||
from_secret: SHIFTH
|
from_secret: SHIFTH
|
||||||
ST_EMAIL:
|
ST_EMAIL:
|
||||||
from_secret: ST_EMAIL
|
from_secret: ST_EMAIL
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: test
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: install_venv
|
||||||
|
image: *python_image
|
||||||
|
commands:
|
||||||
|
- python -m venv venv
|
||||||
|
- venv/bin/pip install -r requirements/dev.txt
|
||||||
- name: django_test
|
- name: django_test
|
||||||
image: *python_image
|
image: *python_image
|
||||||
environment:
|
environment:
|
||||||
<<: *default_environment
|
<<: *default_environment
|
||||||
commands:
|
commands:
|
||||||
- pip install -r requirements/dev.txt
|
- venv/bin/python manage.py test
|
||||||
- python manage.py test
|
|
||||||
- name: coverage
|
- name: coverage
|
||||||
image: *python_image
|
image: *python_image
|
||||||
environment:
|
environment:
|
||||||
<<: *default_environment
|
<<: *default_environment
|
||||||
commands:
|
commands:
|
||||||
- pip install -r requirements/dev.txt
|
- venv/bin/coverage run
|
||||||
- coverage run
|
- venv/bin/coverage report -m
|
||||||
- coverage report -m
|
- venv/bin/coverage html -d public/coverage
|
||||||
- coverage html -d public/coverage
|
|
||||||
- name: upload_artifacts
|
- name: upload_artifacts
|
||||||
image: plugins/s3
|
image: plugins/s3
|
||||||
settings:
|
settings:
|
||||||
@ -54,7 +58,7 @@ steps:
|
|||||||
region:
|
region:
|
||||||
from_secret: S3_REGION
|
from_secret: S3_REGION
|
||||||
bucket: drone
|
bucket: drone
|
||||||
target: /target/location/${DRONE_BUILD_NUMBER}
|
target: /access-controller/${DRONE_BUILD_NUMBER}
|
||||||
access_key:
|
access_key:
|
||||||
from_secret: S3_ACCESS_KEY
|
from_secret: S3_ACCESS_KEY
|
||||||
secret_key:
|
secret_key:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user