This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
forked from ceph/ceph
-
Notifications
You must be signed in to change notification settings - Fork 10
158 lines (126 loc) · 3.93 KB
/
test-s3gw.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
---
name: Test s3gw
on:
pull_request:
branches:
- "s3gw"
push:
branches:
ci/s3tests-results
tags:
- "s3gw-v*"
# This is useful when rebasing
workflow_dispatch:
env:
CMAKE_BUILD_TYPE: Debug
NPROC: 16
# Note: max 128 chars according to OCI Distribution Spec
IMAGE_TAG: ${{ github.workflow_sha }}-${{ github.run_id }}-${{ github.run_attempt }}
jobs:
tests:
runs-on: self-hosted
steps:
- name: Checkout ceph
uses: actions/checkout@v3
with:
path: ceph
submodules: recursive
- name: Checkout s3gw
uses: actions/checkout@v3
with:
repository: aquarist-labs/s3gw
path: s3gw
submodules: false
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
s3cmd
python3 -m pip install -r ceph/qa/rgw/store/sfs/tests/requirements.txt
- name: Build Unittests
run: |
docker build \
--build-arg CMAKE_BUILD_TYPE=Debug \
--build-arg NPROC=16 \
--file s3gw/Dockerfile \
--tag s3gw-unittests:${IMAGE_TAG} \
--target s3gw-unittests \
.
- name: Run Unittests
run: |
docker run --rm s3gw-unittests:${IMAGE_TAG}
- name: Build s3gw Container Image
run: |
docker build \
--build-arg CMAKE_BUILD_TYPE=Debug \
--build-arg NPROC=16 \
--file s3gw/Dockerfile \
--tag s3gw:${IMAGE_TAG} \
.
- name: Run Integration tests
run: |
set -e
set -x
source ceph/qa/rgw/store/sfs/tests/helpers.sh
mkdir -p integration/storage
CONTAINER=$(docker run --rm -d \
-p 7480:7480 \
-v $GITHUB_WORKSPACE/integration/storage:/data \
s3gw:${IMAGE_TAG} \
--rgw-backend-store sfs \
--debug-rgw 1 \
--rgw-lc-debug-interval 10)
wait_for_http_200 "http://127.0.0.1:7480"
echo "Running Integration Tests:"
cd ceph/qa/rgw/store/sfs/tests
python3 -m unittest -v test-*.py
docker kill $CONTAINER
- name: Run smoke tests
run: |
set -e
set -x
source ceph/qa/rgw/store/sfs/tests/helpers.sh
mkdir -p smoke/storage
CONTAINER=$(docker run --rm -d \
-p 7480:7480 \
-v $GITHUB_WORKSPACE/smoke/storage:/data \
s3gw:${IMAGE_TAG} \
--rgw-backend-store sfs \
--debug-rgw 1)
wait_for_http_200 "http://127.0.0.1:7480"
echo "Running Smoke Tests:"
cd ceph/qa/rgw/store/sfs/tests
./sfs-smoke-test.sh 127.0.0.1:7480
docker kill $CONTAINER
- name: Run S3 Tests
run: |
set -x
docker run --rm \
-v /run/docker.sock:/run/docker.sock \
-v ${GITHUB_WORKSPACE}/s3tr-out:/out \
--pull=always \
ghcr.io/aquarist-labs/s3tr:latest \
run \
--image s3gw:${IMAGE_TAG} \
--docker-api unix:///run/docker.sock \
--nproc 10 \
/out/s3tr.json
- name: Archive Results
uses: actions/upload-artifact@v3
with:
name: s3tests-results-${{ github.workflow_sha }}-${{ github.run_id }}-${{ github.run_attempt }}
path: s3tr-out/s3tr.json
- name: Analyze Results
run: |
set -x
docker run --rm \
-v ${GITHUB_WORKSPACE}/s3tr-out:/out \
-v ${GITHUB_WORKSPACE}/ceph:/ceph:ro \
ghcr.io/aquarist-labs/s3tr:latest \
analyze summary \
/out/s3tr.json \
/ceph/qa/rgw/store/sfs/tests/fixtures/s3tr_excuses.csv