-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
46 lines (40 loc) · 922 Bytes
/
.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
stages:
- quality_checks
- integration_tests
- publish
image: rust:buster
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- ~/.cargo
lint:
stage: quality_checks
script:
- rustup component add clippy
- cargo clippy
unit_test:
stage: quality_checks
script:
- cargo test
browser_integration_test:
stage: integration_tests
script:
- apt-get update
- apt-get install firefox-esr -y
- cargo install wasm-pack
- wasm-pack test --headless --firefox
npm_publish:
stage: publish
script:
- cargo install wasm-pack
- apt-get update
- apt-get install curl
- curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
- apt-get install -y nodejs
- wasm-pack build
- echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ./pkg/.npmrc
- node ./ci/include_js_snippets_in_package.js
- wasm-pack pack
- wasm-pack publish
only:
- main