-
Notifications
You must be signed in to change notification settings - Fork 24
180 lines (170 loc) · 5.2 KB
/
Copy path_integration-tests.yaml
File metadata and controls
180 lines (170 loc) · 5.2 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
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
on:
workflow_call:
inputs:
vsix-artifact-name:
description: Name of the VSIX artifact to download
required: true
type: string
runner-ubuntu:
description: Ubuntu runner label
required: false
type: string
default: ubuntu-latest
runner-macos:
description: macOS runner label
required: false
type: string
default: macos-latest
runner-windows:
description: Windows runner label
required: false
type: string
default: windows-latest
run-ubuntu:
description: Whether to run Ubuntu integration tests
required: false
type: boolean
default: true
run-macos:
description: Whether to run macOS integration tests
required: false
type: boolean
default: true
run-windows:
description: Whether to run Windows integration tests
required: false
type: boolean
default: true
enable-qemu:
description: Whether to set up QEMU for Ubuntu Minikube
required: false
type: boolean
default: true
install-yarn:
description: Whether to install Yarn globally (for self-hosted runners)
required: false
type: boolean
default: false
retry-wait-ubuntu:
description: Retry wait seconds for Ubuntu
required: false
type: number
default: 30
retry-wait-macos:
description: Retry wait seconds for macOS
required: false
type: number
default: 60
retry-wait-windows:
description: Retry wait seconds for Windows
required: false
type: number
default: 30
name: Integration Tests
jobs:
test-ubuntu:
if: ${{ inputs.run-ubuntu }}
runs-on: ${{ inputs.runner-ubuntu }}
timeout-minutes: 60
env:
CODE_VERSION: max
TEST_RESOURCES: test-resources
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup-tools
with:
cache: yarn
- uses: ./.github/actions/setup-minikube
with:
enable-qemu: ${{ inputs.enable-qemu && 'true' || 'false' }}
- name: Install Yarn
if: ${{ inputs.install-yarn }}
run: npm install -g yarn
- name: Download VSIX artifact
uses: actions/download-artifact@v8
with:
name: ${{ inputs.vsix-artifact-name }}
- name: Install test dependencies
run: yarn install --mode=skip-build
- name: Allow unprivileged user namespace
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Run Integration Tests
uses: nick-fields/retry@v4.0.0
with:
timeout_minutes: 30
retry_wait_seconds: ${{ inputs.retry-wait-ubuntu }}
max_attempts: 2
command: |
eval $(minikube -p minikube docker-env)
xvfb-run -a yarn run test:it:with-prebuilt-vsix:minikube
- uses: ./.github/actions/upload-test-artifacts
if: failure()
with:
os-name: ubuntu
test-macos:
if: ${{ inputs.run-macos }}
runs-on: ${{ inputs.runner-macos }}
timeout-minutes: 60
env:
CODE_VERSION: max
TEST_RESOURCES: test-resources
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup-tools
with:
cache: yarn
- name: Install Yarn
if: ${{ inputs.install-yarn }}
run: npm install -g yarn
- name: Download VSIX artifact
uses: actions/download-artifact@v8
with:
name: ${{ inputs.vsix-artifact-name }}
- name: Install test dependencies
run: yarn install --mode=skip-build
- name: Run Integration Tests
uses: nick-fields/retry@v4.0.0
with:
timeout_minutes: 30
retry_wait_seconds: ${{ inputs.retry-wait-macos }}
max_attempts: 2
command: yarn run test:it:with-prebuilt-vsix
on_retry_command: rm -rf "${RUNNER_TEMP}/extest-code"
- uses: ./.github/actions/upload-test-artifacts
if: failure()
with:
os-name: macos
test-windows:
if: ${{ inputs.run-windows }}
runs-on: ${{ inputs.runner-windows }}
timeout-minutes: 60
env:
CODE_VERSION: max
TEST_RESOURCES: test-resources
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup-tools
with:
cache: yarn
- name: Install Yarn
if: ${{ inputs.install-yarn }}
run: npm install -g yarn
- name: Download VSIX artifact
uses: actions/download-artifact@v8
with:
name: ${{ inputs.vsix-artifact-name }}
- name: Install test dependencies
run: yarn install --mode=skip-build
- name: Run Integration Tests
uses: nick-fields/retry@v4.0.0
with:
timeout_minutes: 30
retry_wait_seconds: ${{ inputs.retry-wait-windows }}
max_attempts: 2
command: |
Set-DisplayResolution -Width 1920 -Height 1080 -Force
yarn run test:it:with-prebuilt-vsix
- uses: ./.github/actions/upload-test-artifacts
if: failure()
with:
os-name: windows