forked from lirantal/pact-workshop-provider-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (40 loc) · 1.34 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
language: node_js
node_js:
- "8"
install:
- npm install
jobs:
include:
- stage: consumers_dev_contracts
env:
- CONSUMERS_CONTRACT_TAG=develop
script:
# run the provider contract testing
# we first begin by instantiating a real provider instance
- npm start &
# then we run the provider states management service
- npm run pact:provider:states &
# wait for the above services to be functional and ready
# to handle incoming requests
- npm run pact:provider:readyness
# run pact provider tests for WIP contracts and allow
# this build to fail so it doesn't hold the provider
- npm test || exit 0
- stage: consumers_prod_contracts
env:
- CONSUMERS_CONTRACT_TAG=prod
script:
# run the provider contract testing
# we first begin by instantiating a real provider instance
- npm start &
# then we run the provider states management service
- npm run pact:provider:states &
# wait for the above services to be functional and ready
# to handle incoming requests
- npm run pact:provider:readyness
# run pact provider tests
- npm test
stages:
- name: consumers_dev_contracts
- name: consumers_prod_contracts
if: branch = master AND type != pull_request