This repository was archived by the owner on Dec 11, 2022. It is now read-only.
forked from fortify-enterprise/OpenAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbitbucket-pipelines.yml
More file actions
137 lines (136 loc) · 4.34 KB
/
bitbucket-pipelines.yml
File metadata and controls
137 lines (136 loc) · 4.34 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
pipelines:
default:
- step: &generate-sdks
name: Generate SDKs
image: timbru31/java-node:8-jdk-14
caches:
- node
script:
- npm install
- npm run generate
artifacts:
- dist/**
- parallel:
- step: &check-sdk-versions
name: Check SDK versions
image: atlassian/default-image:2
script:
- bash scripts/check-versions.sh
- step: &run-javascript-tests
name: Run JavaScript tests
image: node:14.16
caches:
- javascript-sdk-node
script:
- cd dist/sdk-javascript/
- npm install
- npm run test:junit-report
- step: &run-php-tests
name: Run PHP tests
image: php:7.4
caches:
- composer
script:
- apt-get update && apt-get install -y unzip git
- pecl install pcov && docker-php-ext-enable pcov
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- cd dist/sdk-php/
- composer install
- bash run-tests.sh
- step: &run-python-tests
name: Run Python tests
image: python:3.9.1
caches:
- pip
script:
- python -m pip install tox
- cd dist/sdk-python/
- python -m tox
- step: &run-java-tests
name: Run Java tests
image: maven:3-jdk-8
caches:
- maven
script:
- cd dist/sdk-java/
- mvn --batch-mode test
- step: &run-ruby-tests
name: Run Ruby tests
image: ruby:2.7
caches:
- ruby-sdk-bundler
script:
- cd dist/sdk-ruby/
- bundle install --path vendor/bundle/
- bundle exec rake test
- gem build --strict --verbose *.gemspec
- step: &run-csharp-netcore-tests
name: Run C# .NET Core tests
image: mcr.microsoft.com/dotnet/sdk:3.1
caches:
- dotnetcore
script:
- cd dist/sdk-csharp-netcore/
- dotnet test src/Trulioo.SDK.Test/ "--logger:junit;LogFilePath=../test-reports/junit.xml" /p:CollectCoverage=true
- step: &run-functional-tests
name: Run functional tests
image: node:14-buster
caches:
- javascript-sdk-node
- composer
- pip
- maven
- ruby-sdk-bundler
- dotnetcore
script:
- bash automation/install-dependencies.sh
- npm install
- npm test
branches:
master:
- step: *generate-sdks
- parallel:
- step: *check-sdk-versions
- step: *run-javascript-tests
- step: *run-php-tests
- step: *run-python-tests
- step: *run-java-tests
- step: *run-ruby-tests
- step: *run-csharp-netcore-tests
- step: *run-functional-tests
- step:
name: Deploy to QA Branch
deployment: QA Branch
trigger: manual
image: atlassian/default-image:2
script:
- git push origin master:qa
qa:
- step: *generate-sdks
- parallel:
- step: *check-sdk-versions
- step: *run-javascript-tests
- step: *run-php-tests
- step: *run-python-tests
- step: *run-java-tests
- step: *run-ruby-tests
- step: *run-csharp-netcore-tests
- step: *run-functional-tests
- step:
name: Deploy to SDK Repos
deployment: SDK Repos
trigger: manual
image: atlassian/default-image:2
script:
- bash automation/deploy-sdk-repos.sh
- step:
name: Deploy to GitHub Repo
deployment: GitHub Repo
trigger: manual
image: atlassian/default-image:2
script:
- git push "https://${GITHUB_TOKEN}@github.com/Trulioo/OpenAPI" qa:master
definitions:
caches:
javascript-sdk-node: dist/sdk-javascript/node_modules/
ruby-sdk-bundler: dist/sdk-ruby/vendor/bundle/