-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (53 loc) · 1.9 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
# The jobs section declares jobs available in this build context
jobs:
include:
# lint and run tests
- stage: "lint-and-test"
name: "Lint, run tests"
language: node_js
install:
- npm ci
script:
- npm run testAndLint
- stage: publish
name: "Run semantic-release and publish a new version"
language: node_js
install:
- npm ci
# Install a new version of the openshift cli
- mkdir -p /opt/openshift
- wget -qO- https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz | tar xvzf - -C /opt/openshift --strip-components=1
- export PATH=$PATH:/opt/openshift
- echo $OPENSHIFT_CERT | base64 --decode > /tmp/openshift.crt
script:
- npx semantic-release
- stage: e2e
language: node_js
services:
- docker
before_install:
# Install a newer version of docker-compose than the one provided by Travis
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- sudo apt-get install libgconf-2-4 # cypress needs this
- git clone https://github.com/egendata/e2e.git ../e2e
install:
- npm ci
- npm ci --prefix ../e2e
script:
- npm run test:local:cv --prefix ../e2e
# Flow control
# This section defines the order in which stages are run and when to run certain stages
stages:
- name: lint-and-test
if: branch != master AND tag IS NOT present
- name: publish
if: (branch = master AND type != pull_request)
- name: e2e
if: branch = master && type = pull_request
notifications:
email:
on_success: never
on_failure: change