-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
74 lines (65 loc) · 1.53 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
variables:
# Common variables to be able to build and push docker images
# https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-disabled
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
# Hardhat variables
INFURA_API_KEY: "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
MNEMONIC: "here is where your twelve words mnemonic should be put my friend"
cache:
paths:
- node_modules/
stages:
- check
.install-deps: &install-deps
- apk update
- apk add git musl-dev python3-dev
- apk add --upgrade coreutils
- git config --global url."https://github.com/".insteadOf ssh://[email protected]/
- npm ci
image: atixlabs/node:12.18.1-alpine-build
lint:
stage: check
script:
- *install-deps
- npm run lint
test:
stage: check
script:
- *install-deps
- npm run test
except:
refs:
# Quick checks on regular branches
- master
- develop
- /^release.*$/
- /^hotfix.*$/
slither:
stage: check
script:
- *install-deps
- pip3 install slither-analyzer
- slither --exclude-dependencies --exclude pragma,low-level-calls .
except:
refs:
# Quick checks on regular branches
- master
- develop
- /^release.*$/
- /^hotfix.*$/
coverage:
stage: check
script:
- *install-deps
- npm run coverage
artifacts:
reports:
cobertura: coverage/cobertura-coverage.xml
only:
refs:
# Only run on master, develop, release/x.y.x and hotfix/xxxx
- master
- develop
- /^release.*$/
- /^hotfix.*$/