-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (35 loc) · 1.13 KB
/
docker.test.command.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
name: Docker test run as command
on:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
jobs:
docker-test:
env:
COMPOSE_ARGS: -f docker-compose.yml -f docker-compose.ci.command.yml
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: docker-compose up
run: docker-compose ${{ env.COMPOSE_ARGS }} up -d
- name: Make a sparql request
run: |
NUM_BINDINGS=$(curl 'http://localhost:9999/bigdata/namespace/wdq/sparql' -H 'Accept: application/sparql-results+json' --data-raw 'query=SELECT+*+WHERE%7B+%3Fs+%3Fp+%3Fo+%7D' | jq '.results.bindings | length')
# should be plenty more than 100
if [[ "$NUM_BINDINGS" -lt 100 ]]; then
exit 1
fi
- name: docker-compose logs > output.log
if: always()
run: docker-compose ${{ env.COMPOSE_ARGS }} logs --no-color > "output.log"
- name: Archive output.log
uses: actions/upload-artifact@v2
if: always()
with:
name: DockerTestLog
if-no-files-found: error
path: output.log