forked from inspirehep/inspirehep
-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (105 loc) · 2.94 KB
/
integration-tests.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
name: Integration tests
on:
workflow_call:
inputs:
ref:
description: The reference to build
type: string
required: true
outputs:
backend-image-id:
description: The ID of image that has been buit
value: ${{ jobs.build-backend.outputs.image-id }}
ui-image-id:
description: The ID of image that has been buit
value: ${{ jobs.build-ui.outputs.image-id }}
editor-image-id:
description: The ID of image that has been buit
value: ${{ jobs.build-editor.outputs.image-id }}
jobs:
build-backend:
uses: ./.github/workflows/build.yml
with:
ref: ${{ inputs.ref }}
image: inspirehep/hep
context: backend/
secrets: inherit
test-backend:
needs: build-backend
strategy:
fail-fast: false
matrix:
include:
- suite: unit
splits: 1
- suite: integration
splits: 8
- suite: integration-async
splits: 4
uses: ./.github/workflows/backend-tests.yml
with:
ref: ${{ inputs.ref }}
image: "inspirehep/hep@${{ needs.build-backend.outputs.image-id }}"
suite: ${{ matrix.suite }}
splits: ${{ matrix.splits }}
build-ui-build-stage:
uses: ./.github/workflows/build.yml
with:
ref: ${{ inputs.ref }}
image: inspirehep/ui-build
context: ui/
stage: build-stage
secrets: inherit
test-ui:
needs: build-ui-build-stage
runs-on: ubuntu-latest
steps:
- name: test
run: >
docker run
--pull always
--network="host"
"inspirehep/ui-build@${{ needs.build-ui-build-stage.outputs.image-id }}"
yarn test
build-ui:
uses: ./.github/workflows/build.yml
with:
ref: ${{ inputs.ref }}
image: inspirehep/ui
context: ui/
secrets: inherit
build-editor-build-stage:
uses: ./.github/workflows/build.yml
with:
ref: ${{ inputs.ref }}
image: inspirehep/editor-build
context: record-editor/
stage: build-stage
secrets: inherit
test-editor:
needs: build-editor-build-stage
runs-on: ubuntu-latest
steps:
- name: test
run: >
docker run
--pull always
--network="host"
"inspirehep/editor-build@${{ needs.build-editor-build-stage.outputs.image-id }}"
yarn lint
build-editor:
uses: ./.github/workflows/build.yml
with:
ref: ${{ inputs.ref }}
image: inspirehep/editor
context: record-editor/
secrets: inherit
test-e2e:
needs: [ build-backend, build-ui, build-editor ]
uses: ./.github/workflows/e2e-tests.yml
with:
ref: ${{ inputs.ref }}
backend-image: "inspirehep/hep@${{ needs.build-backend.outputs.image-id }}"
ui-image: "inspirehep/ui@${{ needs.build-ui.outputs.image-id }}"
editor-image: "inspirehep/editor@${{ needs.build-editor.outputs.image-id }}"
secrets: inherit