forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
97 lines (83 loc) · 2.45 KB
/
config.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
aliases:
- &environment
docker:
# specify the version you desire here
- image: circleci/node:8.9.0
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
working_directory: ~/Prebid.js
- &restore_dep_cache
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- &save_dep_cache
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- &install
name: Install gulp cli
command: sudo npm install -g gulp-cli
- &run_unit_test
name: BrowserStack testing
command: gulp test --browserstack --nolintfix
- &run_endtoend_test
name: BrowserStack End to end testing
command: echo "127.0.0.1 test.localhost" | sudo tee -a /etc/hosts && gulp e2e-test --host=test.localhost
# Download and run BrowserStack local
- &setup_browserstack
name : Download BrowserStack Local binary and start it.
command : |
# Download the browserstack binary file
wget "https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip"
# Unzip it
unzip BrowserStackLocal-linux-x64.zip
# Run the file with user's access key
./BrowserStackLocal ${BROWSERSTACK_ACCESS_KEY} &
- &unit_test_steps
- checkout
- restore_cache: *restore_dep_cache
- run: npm install
- save_cache: *save_dep_cache
- run: *install
- run: *setup_browserstack
- run: *run_unit_test
- &endtoend_test_steps
- checkout
- restore_cache: *restore_dep_cache
- run: npm install
- save_cache: *save_dep_cache
- run: *install
- run: *setup_browserstack
- run: *run_endtoend_test
version: 2
jobs:
build:
<<: *environment
steps: *unit_test_steps
e2etest:
<<: *environment
steps: *endtoend_test_steps
workflows:
version: 2
commit:
jobs:
- build
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- e2etest
experimental:
pipelines: true