-
Notifications
You must be signed in to change notification settings - Fork 0
236 lines (217 loc) · 6.35 KB
/
ci.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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
---
name: CI
on: push
jobs:
build:
uses: ./.github/workflows/js.yml
with:
subcommands: |
python3 scripts/download_wasm.py
npm install
build_in_docker:
uses: ./.github/workflows/js_in_docker.yml
with:
subcommands: |
python3 scripts/download_wasm.py
npm install
kms-version: 4.13.0
findex-cloud-version: 0.3.1
lint:
needs: build
uses: ./.github/workflows/js.yml
with:
subcommands: |
npm run prettier:check
npm run lint
test:
name: vitest with Auth0
needs: build_in_docker
uses: ./.github/workflows/js_in_docker_with_auth0.yml
with:
subcommands: |
npm test
kms-version: 4.13.0
kms-jwe-key:
'{"kty": "OKP","d": "MPEVJwdRqGM_qhJOUb5hR0Xr9EvwMLZGnkf-eDj5fU8","use": "enc","crv": "X25519","kid": "DX3GC+Fx3etxfRJValQNbqaB0gs=","x":
"gdF-1TtAjsFqNWr9nwhGUlFG38qrDUqYgcILgtYrpTY","alg": "ECDH-ES"}'
findex-cloud-version: 0.3.1
regression_files: |
./node_modules/non_regression_vector.json
./node_modules/sqlite.db
secrets: inherit
cloudproof_kms_js:
needs: test
uses: Cosmian/reusable_workflows/.github/workflows/cloudproof_kms_js.yml@develop
with:
branch: develop
kms-version: ghcr.io/cosmian/kms:4.13.0
cloudproof_java:
needs: test
uses: Cosmian/reusable_workflows/.github/workflows/cloudproof_java_in_docker.yml@develop
with:
branch: develop
target: x86_64-unknown-linux-gnu
extension: so
destination: linux-x86-64
os: ubuntu-20.04
kms-version: ghcr.io/cosmian/kms:4.13.0
findex-cloud-version: 0.3.1
copy_fresh_build: false
copy_regression_files: |
cp ./cloudproof_js/non_regression_vector.json src/test/resources/cover_crypt/non_regression/js_non_regression_vector.json
cp ./cloudproof_js/sqlite.db src/test/resources/findex/non_regression/js_sqlite.db
cloudproof_python:
needs:
- test
uses: Cosmian/reusable_workflows/.github/workflows/cloudproof_python.yml@develop
with:
branch: develop
target: x86_64-unknown-linux-gnu
kms-version: ghcr.io/cosmian/kms:4.13.0
findex-cloud-version: 0.3.1
copy_fresh_build: false
copy_regression_files: |
cp ./cloudproof_js/non_regression_vector.json tests/data/cover_crypt/non_regression/js_non_regression_vector.json
cp ./cloudproof_js/sqlite.db tests/data/findex/non_regression/js_sqlite.db
cloudproof_flutter:
needs:
- test
uses: Cosmian/reusable_workflows/.github/workflows/cloudproof_flutter.yml@develop
with:
branch: develop
target: x86_64-unknown-linux-gnu
extension: so
copy_fresh_build: false
copy_regression_files: |
cp ./cloudproof_js/non_regression_vector.json test/resources/cover_crypt/non_regression/js_non_regression_vector.json
cp ./cloudproof_js/sqlite.db test/resources/findex/non_regression/js_sqlite.db
example_vuejs:
name: vuejs tests
needs: build_in_docker
uses: ./.github/workflows/js_in_docker.yml
with:
subcommands: |
cd examples/vuejs
npm install
npm run build
npm run serve -- --port 8090 &
sleep 5
cd ../test
node chrome.mjs http://localhost:8090 http://kms:9998
kms-version: 4.13.0
findex-cloud-version: 0.3.1
example_reactjs:
name: reactjs tests
needs: build_in_docker
uses: ./.github/workflows/js_in_docker.yml
with:
subcommands: |
cd examples/reactjs
npm install
npm run build
npm run serve -- --port 8090 &
sleep 5
cd ../test
node chrome.mjs http://localhost:8090 http://kms:9998
kms-version: 4.13.0
findex-cloud-version: 0.3.1
example_browser:
name: browser
needs: build_in_docker
uses: ./.github/workflows/js_in_docker.yml
with:
subcommands: |
cd examples/browser
npm install
python3 -m http.server &
sleep 3
node test.mjs
kms-version: 4.13.0
findex-cloud-version: 0.3.1
example_webpack:
name: webpack
needs: build
uses: ./.github/workflows/js.yml
with:
subcommands: |
cd examples/webpack
npm install
npx webpack
example_nodejs:
name: nodejs with Auth0
needs: build_in_docker
uses: ./.github/workflows/js_in_docker_with_auth0.yml
with:
subcommands: |
cd examples/nodejs
npm install
node test.mjs 10
kms-version: 4.13.0
findex-cloud-version: 0.3.1
secrets: inherit
example_imdb:
name: nodejs with imdb
needs: build
uses: ./.github/workflows/js.yml
with:
subcommands: |
cd examples/nodejs_search_imdb
curl https://datasets.imdbws.com/title.basics.tsv.gz --output imdb.tsv.gz
gzip -d imdb.tsv.gz
npm install
node test.mjs
example_full_text_search:
name: nodejs with full text search
needs: build
uses: ./.github/workflows/js.yml
with:
subcommands: |
cd examples/full_text_search
npm install
node test.mjs
publish-dry-run:
needs:
- lint
- cloudproof_kms_js
- cloudproof_java
- cloudproof_flutter
- cloudproof_python
- example_imdb
- example_full_text_search
- example_nodejs
- example_webpack
- example_reactjs
- example_vuejs
- example_browser
uses: ./.github/workflows/js.yml
with:
subcommands: |
echo "//registry.npmjs.org/:_authToken=$NPM_ACCESS_TOKEN" > ~/.npmrc
npm publish --dry-run
secrets: inherit
publish:
needs:
- publish-dry-run
uses: ./.github/workflows/js.yml
if: startsWith(github.ref, 'refs/tags/')
with:
subcommands: |
echo "//registry.npmjs.org/:_authToken=$NPM_ACCESS_TOKEN" > ~/.npmrc
npm publish
secrets: inherit
release:
needs:
- publish-dry-run
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
cleanup:
needs:
- publish
uses: Cosmian/reusable_workflows/.github/workflows/cleanup_cache.yml@main
if: startsWith(github.ref, 'refs/tags/')
secrets: inherit