-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
96 lines (88 loc) · 1.49 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
89
90
91
92
93
94
95
96
include:
- 'https://gitlab.com/Cynerd/gitlab-ci-nix/-/raw/master/template.yml'
image: nixos/nix
.task:
stage: test
# extends: .nix
# tags: [docker]
only:
- merge_request
before_script:
- echo "experimental-features = nix-command flakes" >>/etc/nix/nix.conf
stages:
- pre
- test
- build
- release
# install:deps:
# stage: pre
# extends:
# - .task
# only:
# - merge_request
# script:
# - nix develop
#
lint:
extends:
- .task
script:
- nix develop -c task lint
tests:unit:
extends:
- .task
variables:
XDG_DATA_HOME: "/tmp/"
script:
- nix develop -c task tests:unit
coverage:
extends:
- .task
only:
- main
- merge_request
variables:
XDG_DATA_HOME: "/tmp/"
script:
- nix develop -c task coverage
coverage: /^coverage:\s(\d+(?:\.\d+)?%)/
artifacts:
reports:
junit: report.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
build:binary:
stage: build
only:
- main
extends:
- .task
script:
- nix build
#
# build:docker:
# stage: build
# only:
# - tags
# needs: []
# extends:
# - .task
# variables:
# DOCKER_HOST: tcp://docker:2375
# DOCKER_DRIVER: overlay2
# services:
# - docker:27.0.3-dind
# script:
# - nix build .#container
# - nix develop -c task docker:publish
release:
stage: release
extends:
- .task
only:
- tags
variables:
GIT_DEPTH: 0
script:
- nix develop -c task release