-
Notifications
You must be signed in to change notification settings - Fork 0
177 lines (167 loc) · 4.73 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
---
name: Pull request
on:
push:
branches:
- main
pull_request:
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: Build documentation
# run: make docs
# lint:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Lint
# run: make lint
# 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: 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 Ansible playbook
run: ansible-playbook -i deployment/inventory deployment/site.yml --skip-tags docker
- name: Wait for reductionist server to start
run: |
attempts=60
until curl -if --cacert root.crt https://localhost:8080/.well-known/reductionist-schema; do
sleep 1;
let attempts=$((attempts - 1))
if [[ $attempts -eq 0 ]]; then
echo "Timed out waiting for reductionist to start"
exit 1
fi
done
- name: Upload some sample data
run: python ./scripts/upload_sample_data.py
- name: Perform a smoke test
run: >
python ./scripts/client.py
sum
--server https://localhost: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
docker ps -a
for container in $(docker ps -aq); do
docker logs $container
done
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