-
Notifications
You must be signed in to change notification settings - Fork 17
211 lines (177 loc) · 7.22 KB
/
LocalTesting.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
name: Azurite (local) functional tests
on: [push, pull_request,repository_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
azurite-tests-linux:
name: Azurite tests (Linux)
runs-on: ubuntu-latest
container: 'quay.io/pypa/manylinux2014_x86_64'
env:
VCPKG_TARGET_TRIPLET: 'x64-linux'
GEN: Ninja
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
AZURE_STORAGE_CONNECTION_STRING: 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;'
AZURE_STORAGE_ACCOUNT: devstoreaccount1
HTTP_PROXY_RUNNING: '1'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- name: install Azure test service
run: |
yum install -y nodejs npm squid
npm install -g azurite
echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | tee /etc/yum.repos.d/azure-cli.repo
yum install -y azure-cli
- name: Launch & populate Azure test service
run: |
azurite > azurite_log.txt 2>&1 &
./scripts/run_squid.sh --port 3128 --log_dir squid_logs &
./scripts/run_squid.sh --port 3129 --log_dir squid_auth_logs --auth &
sleep 10
./scripts/upload_test_files_to_azurite.sh
- name: Setup ManyLinux2014
run: |
./duckdb/scripts/setup_manylinux2014.sh general aws-cli ccache ssh openssl python_alias
- name: Setup vcpkg
uses: lukka/[email protected]
with:
vcpkgGitCommitId: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
# Build extension
- name: Build extension
env:
GEN: ninja
run: |
make release
- name: Test extension
run: |
make test
- name: Run test data integrity check
run: |
./build/release/duckdb -c "CREATE PERSISTENT SECRET s1 (TYPE AZURE, CONNECTION_STRING '$AZURE_STORAGE_CONNECTION_STRING')"
DUCKDB_AZURE_PERSISTENT_SECRET_AVAILABLE=1 ./build/release/test/unittest "*test/sql/test_data_integrity.test"
- name: Azure test server log
if: always()
shell: bash
run: |
echo "## azurite"
cat azurite_log.txt
echo "## squid"
cat squid_logs/*
echo "## squid auth"
cat squid_auth_logs/*
azurite-tests-macos:
name: Azurite tests (MacOS)
runs-on: macos-latest
env:
VCPKG_TARGET_TRIPLET: 'x64-osx'
OSX_BUILD_ARCH: 'x86_64'
GEN: Ninja
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
AZURE_STORAGE_CONNECTION_STRING: 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;'
AZURE_STORAGE_ACCOUNT: devstoreaccount1
HTTP_PROXY_RUNNING: '1'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- name: Install Ninja
run: brew install ninja
- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
with:
key: ${{ github.job }}
save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb_azure' }}
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
- name: Build extension
shell: bash
run: |
make release
- uses: actions/setup-node@v3
- name: Launch & populate Azure test service
run: |
brew install squid
npm install -g azurite
./scripts/run_squid.sh --port 3128 --log_dir squid_logs &
./scripts/run_squid.sh --port 3129 --log_dir squid_auth_logs --auth &
azurite > azurite_log.txt 2>&1 &
sleep 10
./scripts/upload_test_files_to_azurite.sh
- name: Test Extension
shell: bash
run: |
make test
- name: Run test data integrity check
run: |
./build/release/duckdb -c "CREATE PERSISTENT SECRET s1 (TYPE AZURE, CONNECTION_STRING '$AZURE_STORAGE_CONNECTION_STRING')"
DUCKDB_AZURE_PERSISTENT_SECRET_AVAILABLE=1 ./build/release/test/unittest "*test/sql/test_data_integrity.test"
- name: Azure test server log
if: always()
shell: bash
run: |
echo "## azurite"
cat azurite_log.txt
echo "## squid"
cat squid_logs/*
echo "## squid with auth"
cat squid_auth_logs/*
azurite-tests-windows:
name: Azurite tests (Windows)
runs-on: windows-latest
env:
VCPKG_TARGET_TRIPLET: 'x64-windows'
GEN: Ninja
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake
AZURE_STORAGE_CONNECTION_STRING: 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;'
AZURE_STORAGE_ACCOUNT: devstoreaccount1
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Build extension
run: |
make release
- uses: actions/setup-node@v3
- name: Launch & populate Azure test service
run: |
npm install -g azurite
azurite > azurite_log.txt 2>&1 &
sleep 10
./scripts/upload_test_files_to_azurite.sh
- name: Test Extension
shell: bash
run: |
build/release/test/Release/unittest.exe --test-dir . "[sql]"
- name: Run test data integrity check
run: |
ls build
ls build/release
./build/release/Release/duckdb.exe -c "CREATE PERSISTENT SECRET s1 (TYPE AZURE, CONNECTION_STRING '$AZURE_STORAGE_CONNECTION_STRING')"
DUCKDB_AZURE_PERSISTENT_SECRET_AVAILABLE=1 build/release/test/Release/unittest.exe "*test/sql/test_data_integrity.test"
- name: Azure test server log
if: always()
shell: bash
run: |
cat azurite_log.txt