-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
64 lines (56 loc) · 1.58 KB
/
.travis.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
sudo: required
dist: jammy
language: node_js
node_js:
- '22.4.0'
addons:
apt:
update: true
sources:
- google-chrome
packages:
- dpkg
chrome: stable
services:
- xvfb
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- npm i -g npm@8.19.4
- npm --version
install:
- npm install -g makeshift && makeshift -s @systelab-technologies -r https://registry.npmjs.org
- npm install -g codecov
- npm install -g codacy-coverage
- npm ci
before_script:
- export NODE_OPTIONS="--max-old-space-size=8192"
script:
- npm run build-lib
- npm run build-showcase
- npm run test
after_success:
- cat coverage/systelab-components/lcov.info | codecov
- cat ./coverage/systelab-components/lcov.info | codacy-coverage
before_deploy: |
if [ -n "$GITHUB_API_KEY" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
git clone https://github.com/systelab/systelab.github.io.git
rm -rf systelab.github.io/components/*
cp -r dist/systelab-components/* systelab.github.io/components
sed -i -e "s~base href=\"/\"~base href=\"/components/\"~g" ./systelab.github.io/components/index.html
cd systelab.github.io
git add .
git -c user.name='travis' -c user.email='travis' commit -m 'New deploy from Travis'
git push -f -q https://systelab:$GITHUB_API_KEY@github.com/systelab/systelab.github.io
cd ..
fi
cd dist/systelab-components
deploy:
skip_cleanup: true
provider: npm
email: aserra@werfen.com
edge:
branch: v2.0.3-beta.5
api_key: $NPM_TOKEN
on:
tags: true