-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
71 lines (67 loc) · 1.6 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
71 lines (67 loc) · 1.6 KB
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
default:
tags:
- linux
stages:
- prepare
- lint
- test
build_build_image:
services:
- docker:24-dind
image: docker:24-cli
stage: prepare
before_script:
# this is to be able to pull and push images
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
script:
- cd .ci
- docker build -t $CI_REGISTRY_IMAGE/buildimage:latest .
- docker push $CI_REGISTRY_IMAGE/buildimage:latest
rules:
- if: '$CI_PIPELINE_SOURCE != "push"'
when: never
- changes:
- .ci/Dockerfile
lint:
image: $CI_REGISTRY_IMAGE/buildimage:latest
stage: lint
before_script: deno install --frozen
script:
- SKIP='check-format, lint-files' pre-commit run --all-files
- deno task format:check
# - deno task lint
- deno run -A eslint-wrapper.ts --max-warnings 0 ./src
variables:
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
DENO_DIR: ${CI_PROJECT_DIR}/.cache/deno
cache:
- key:
files:
- deno.lock
paths:
- .cache/deno
test:
image: $CI_REGISTRY_IMAGE/buildimage:latest
stage: test
before_script: deno install --frozen
script: deno task test:ci
coverage: /All files(?:[^|]*\|){4}\s*(\S+)/
artifacts:
expire_in: 1 week
paths:
- coverage/
when: always
reports:
junit:
- junit.xml
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
variables:
DENO_DIR: ${CI_PROJECT_DIR}/.cache/deno
cache:
- key:
files:
- deno.lock
paths:
- .cache/deno