Skip to content

Commit db2c255

Browse files
committed
Run compliance suite with cache enabled as part of CI test suite
1 parent 1bad961 commit db2c255

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

Diff for: .github/workflows/pull-request.yml

+39-3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ jobs:
9999
sleep 1;
100100
done
101101
102+
- name: Create artifacts directory
103+
run: mkdir artifacts
104+
105+
#####
106+
# Test without local disk cache
107+
#####
108+
102109
- name: Run active storage container
103110
run: make run
104111

@@ -108,16 +115,43 @@ jobs:
108115
sleep 1;
109116
done
110117
111-
- name: Create artifacts directory
112-
run: mkdir artifacts
113-
114118
- name: Run compliance test suite
115119
run: pytest -s > artifacts/pytest.log
116120

117121
- name: Get active storage logs
118122
run: docker logs reductionist > artifacts/reductionist.log
119123
if: always()
120124

125+
- name: Stop active storage container
126+
run: docker stop reductionist
127+
128+
#####
129+
# Test with local disk cache
130+
#####
131+
132+
- name: Run active storage container with local disk cache
133+
run: make run-with-cache
134+
135+
- name: Wait for active storage server to start
136+
run: |
137+
until curl -if http://localhost:8080/.well-known/reductionist-schema; do
138+
sleep 1;
139+
done
140+
141+
- name: Run compliance test suite
142+
run: pytest -s > artifacts/pytest-with-cache.log
143+
144+
- name: Get active storage logs
145+
run: docker logs reductionist > artifacts/reductionist-with-cache.log
146+
if: always()
147+
148+
- name: Stop active storage container
149+
run: docker stop reductionist
150+
151+
#####
152+
# Clean up steps
153+
#####
154+
121155
- name: Upload artifacts
122156
uses: actions/upload-artifact@v4
123157
with:
@@ -132,6 +166,7 @@ jobs:
132166
- name: Stop active storage container
133167
run: make stop
134168
if: always()
169+
135170
deployment-test:
136171
runs-on: ubuntu-latest
137172
steps:
@@ -183,6 +218,7 @@ jobs:
183218
sudo ip a
184219
sudo ip r
185220
if: failure()
221+
186222
dependency-review:
187223
runs-on: ubuntu-latest
188224
if: github.event_name == 'pull_request'

Diff for: Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ test:
2323
run:
2424
@docker run -it --detach --rm --net=host --name reductionist reductionist
2525

26+
.PHONY: run-with-cache
27+
run-with-cache:
28+
@docker run -it --detach --rm --net=host --name reductionist reductionist reductionist --use-chunk-cache --chunk-cache-path ./
29+
2630
.PHONY: stop
2731
stop:
2832
@docker stop reductionist

0 commit comments

Comments
 (0)