-
-
Notifications
You must be signed in to change notification settings - Fork 215
/
.gitlab-ci.yml
65 lines (54 loc) · 1.45 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
# We only run this pipeline when something gitlab-related in changed,
# no need to execute it on every run, because basic testing is covered
# by Github Actions.
# TODO: reenable https://gitlab.com/sobolevn/wemake-django-template
workflow:
rules:
- if: "$CI_PIPELINE_SOURCE"
when: always
changes:
- .gitlab-ci.yml
- '{{cookiecutter.project_name}}/.gitlab-ci.yml'
- tests/build.sh
- tests/test_gitlab.sh
# Reusing existing gitlab definition:
include:
- local: '{{cookiecutter.project_name}}/.gitlab-ci.yml'
# Building template project:
mirror-github-build:
stage: build
image: python:3.11.9
variables:
POETRY_VERSION: '1.8.3'
before_script:
# Installing poetry:
- curl -sSL 'https://install.python-poetry.org' | python -
- export PATH="$HOME/.local/bin:$PATH"
# Installing dependencies:
- poetry install --no-dev
script:
- poetry run bash tests/test_gitlab.sh
only:
- master
- external_pull_requests
artifacts:
name: 'template-build'
expire_in: 1 week
paths:
- '.test/wemake-django-template'
# Redefining how tests are executed:
variables:
GROUP_NAME: 'sobolevn'
PROJECT_NAME: 'wemake-django-template'
test:
variables:
CI_PROJECT_DIR: '.test/wemake-django-template'
only:
- master
- external_pull_requests
release-image:
variables:
CI_PROJECT_DIR: '.test/wemake-django-template'
only:
- master
- external_pull_requests