-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
88 lines (81 loc) · 2.15 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
stages:
- verify
- test
- release
include:
- project: 'sds-dev/releases'
ref: main
file: 'releases.yml'
variables:
BUILD_IMAGE: $ARTIFACTORY_SERVER/sds/sdd-common-ci
linting:
stage: verify
tags:
- docker-exec
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
image: $BUILD_IMAGE
before_script:
- pip install -r requirements-dev.txt
script:
- pre-commit run --all-files -c .pre-commit-config.yaml --show-diff-on-failure --color never
- tox -e docs
spellcheck:
stage: verify
tags:
- docker-exec
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
image: $BUILD_IMAGE
before_script:
- pip install pyspelling
script:
- pyspelling
unittest:
stage: test
tags:
- docker-exec
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
image: $BUILD_IMAGE
before_script:
- pip install -r requirements-dev.txt
script:
- tox -e py312
- coverage report --precision=1
coverage: '/TOTAL.*\s+(\d+\%)/'
release-job:
extends: .automated-release
release:
description: $(cat release_changes.md)
# TODO: make docker compose work in gitlab runner
# integration:
# stage: verify
# tags:
# - docker-exec
# rules:
# - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
# services:
# - name: registry.hub.docker.com/library/docker:24.0.6-dind
# alias: docker
# variables:
# DOCKER_HOST: tcp://docker:2375/
# DOCKER_DRIVER: overlay2
# BASE_URL: http://localhost:5430
# OIDC_URL: http://localhost:8000
# OIDC_URL_TEST: http://mockauth:8000
# FF_NETWORK_PER_BUILD: "true"
# image: docker:24.0.6
# before_script:
# - apk --update --no-cache add python3
# - python3 -m ensurepip
# - pip3 install --no-cache --upgrade pip setuptools
# - pip install aiohttp aiofiles motor pytest pytest-asyncio
# script:
# - docker compose -f docker-compose.yml --env-file .env.example up --build -d
# - sleep 30
# - docker network inspect metadata-submitter_default
# - docker compose -f docker-compose.yml --env-file .env.example ps
# - pytest tests/integration/
# after_script:
# - docker compose down -v