This repository has been archived by the owner on Jul 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
.gitlab-ci.yml
51 lines (43 loc) · 1.38 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
stages:
- test
.test:
image: node:12
stage: test
before_script:
# Install protoc
- version=3.7.1
- archive=protoc-$version-linux-x86_64
- curl -O -L https://github.com/protocolbuffers/protobuf/releases/download/v$version/$archive.zip
- unzip -d '/usr/local' $archive.zip 'bin/*' 'include/*'
- rm -rf $archive.zip
# Update java
- apt-get update
- wget https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/pool/main/a/adoptopenjdk-14-hotspot/adoptopenjdk-14-hotspot_14.0.0+36-2_amd64.deb
- apt install -y ./adoptopenjdk-14-hotspot_14.0.0+36-2_amd64.deb
# Install protoc plugin for grpc web
- curl -L https://github.com/grpc/grpc-web/releases/download/1.0.7/protoc-gen-grpc-web-1.0.7-linux-x86_64 --output protoc-gen-grpc-web
- mv protoc-gen-grpc-web /usr/local/bin/
- chmod +x /usr/local/bin/protoc-gen-grpc-web
# Update submodules
- git submodule update --init --recursive
# Install deps
- npm i --cache .npm --prefer-offline --no-audit --progress=false
compile typescript:
stage: test
extends: .test
script:
- npm run build
run tests:
stage: test
extends: .test
script:
- npx nyc npm test
- mkdir -p coverage
- npx nyc report --reporter=text-lcov > coverage/coverage.json
- cat coverage/coverage.json
- npx codecov
run webpack:
stage: test
extends: .test
script:
- npm run webpack