-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
52 lines (47 loc) · 1.17 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
stages:
- version
- build_deploy
- test
variables:
PACKAGE_NAME: 'vercel-deno-dev'
default:
image: node:current-alpine
version-dev:
stage: version
only:
- dev
image: lucemans/docker-deno:alpine
script:
- deno run --unstable --allow-env --allow-read --allow-write pipeline/dev-version.ts
artifacts:
expire_in: 60s
paths:
- package.json
build_deploy:
stage: build_deploy
script:
- yarn install
- yarn build
- npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
- npm publish
test:
stage: test
only:
- dev
image: frolvlad/alpine-glibc:latest
script:
- echo 'install node and deno'
- apk add nodejs
- apk add --update npm
- apk add --no-cache bash
- apk add --virtual .download --no-cache curl
- curl -fsSL https://github.com/denoland/deno/releases/latest/download/deno-x86_64-unknown-linux-gnu.zip --output deno.zip
- unzip deno.zip
- rm deno.zip
- chmod 777 deno
- mv deno /bin/deno
- apk del .download
- echo 'install vercel...'
- npm i -g vercel
- echo 'running test...'
- deno test --unstable --allow-all --allow-net=localhost pipeline/tests.ts