-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
48 lines (40 loc) · 1.08 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
include:
- project: dke/apps/templates/job-templates
file: job-templates.yml
- project: nse/ci
file:
- /ci/lib/common.yml
- /ci/jobs/build-package.yml
- /ci/jobs/publish-package.yml
default:
image: "python:3.8"
stages:
- unit-test
- lint-check
- build
- publish
build-package:
rules:
- when: on_success
publish-package:
rules:
- if: $CI_COMMIT_TAG
before_script:
- pip install .[dev]
# overriding SRC_PROJECT and TEST_FOLDER in the unit_test job would not work,
# the template job needs to be overriden to change the variables it has defined
.unit-tests:
variables:
SRC_PROJECT: $CI_PROJECT_NAME
TEST_FOLDER: 'tests'
unit_test:
stage: unit-test
extends: .unit-tests
variables:
EXTRA_ARGS: --service_username $SERVICE_USERNAME --service_password $SERVICE_PASSWORD --regular_username $REGULAR_USERNAME --regular_password $REGULAR_PASSWORD
lint_check:
stage: lint-check
extends: .flake8
script:
- pycodestyle blue_brain_token_fetch tests --max-line-length 180
- pylint blue_brain_token_fetch tests --fail-under=5