-
Notifications
You must be signed in to change notification settings - Fork 0
198 lines (167 loc) · 5.14 KB
/
pull-request.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
---
name: Pull request
on:
push:
branches:
- main
paths-ignore:
- README.md
pull_request:
paths-ignore:
- README.md
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: make build
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install mkdocs
run: pip install -r docs/requirements.txt
- run: mkdocs build --strict
rustdocs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build documentation
run: make docs
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Lint
run: make lint
- name: Install ansible-lint
run: pip install ansible-lint==6.17.*
- name: Install Ansible Galaxy requirements
run: ansible-galaxy collection install -r deployment/requirements.yml
- name: Lint Ansible playbook
run: ansible-lint deployment/site.yml
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test
run: make test
compliance-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: make build
- name: Checkout compliance test suite
uses: actions/checkout@v3
with:
repository: stackhpc/s3-active-storage-compliance-suite
path: compliance
- name: Setup python
uses: actions/setup-python@v4
- name: Install compliance test suite dependencies
run: pip install -r requirements.txt
working-directory: compliance
- name: Configure compliance test suite
run: |
echo 'PROXY_URL = "http://localhost:8080"' >> compliance/config.py
working-directory: compliance
- name: Start minio object storage
run: scripts/minio-start
- name: Wait for minio object storage to start
run: |
until curl -if http://localhost:9001; do
sleep 1;
done
- name: Run active storage container
run: make run
- name: Wait for active storage server to start
run: |
until curl -if http://localhost:8080/.well-known/reductionist-schema; do
sleep 1;
done
- name: Create artifacts directory
run: mkdir artifacts
- name: Run compliance test suite
run: pytest -s > artifacts/pytest.log
- name: Get active storage logs
run: docker logs reductionist > artifacts/reductionist.log
if: always()
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: compliance-test
path: artifacts
if: always()
- name: Stop minio object storage
run: scripts/minio-stop
if: always()
- name: Stop active storage container
run: make stop
if: always()
deployment-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
- name: Install deployment dependencies
run: pip install -r deployment/requirements.txt
- name: Install Ansible Galaxy requirements
run: ansible-galaxy collection install -r deployment/requirements.yml
- name: Run Ansible playbook
# GitHub runner already has Docker installed.
run: ansible-playbook -i deployment/inventory deployment/site.yml --skip-tags docker
- name: Install Python client dependencies
run: pip install -r scripts/requirements.txt
- name: Upload some sample data
run: python ./scripts/upload_sample_data.py
- name: Perform a smoke test
run: >
# Get the local IP of the default route
ip=$(ip r get 8.8.8.8 | awk '/via/ { print $7 }') &&
python ./scripts/client.py
sum
--server https://${ip}:8080
--cacert root.crt
--source http://localhost:9000
--username minioadmin --password minioadmin
--bucket sample-data --object data-uint32.dat
--dtype uint32
- name: Debug on failure
run: |
set -x
set +e
docker ps -a
for container in $(docker ps -aq); do
docker logs $container
done
sudo ss -nltp
sudo cat /etc/haproxy/haproxy.cfg
sudo cat /etc/prometheus/prometheus.yml
sudo ip a
sudo ip r
if: failure()
dependency-review:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dependency Review
uses: actions/dependency-review-action@v3
with:
# https://github.com/advisories/GHSA-g98v-hv3f-hcfr atty potential unaligned read on Windows
allow-ghsas: GHSA-g98v-hv3f-hcfr