Repository navigation
66 lines (55 loc) · 1.88 KB
/
Copy pathcontainer-integration-test.yml
File metadata and controls
66 lines (55 loc) · 1.88 KB
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
name: Container integration test
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: container-integration-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
clone-index-and-query:
name: Clone, index and query repository
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out GitDatabase
uses: actions/checkout@v4
- name: Prepare report directory
run: mkdir -p test-results
- name: Build containers and run integration test
run: >-
docker compose
-f docker/docker-compose.integration-test.yml
up
--build
--abort-on-container-exit
--exit-code-from integration-test
integration-test
- name: Publish integration test summary
if: always()
shell: bash
run: |
report="test-results/container-integration-test.md"
if [[ -f "${report}" ]]; then
cat "${report}" | tee -a "${GITHUB_STEP_SUMMARY}"
else
message="Integration test did not produce a report. Inspect the Compose logs above."
printf '## Container integration test\n\n%s\n' "${message}" | tee -a "${GITHUB_STEP_SUMMARY}"
fi
- name: Upload integration test report
if: always()
uses: actions/upload-artifact@v4
with:
name: container-integration-test-report
path: test-results/container-integration-test.md
if-no-files-found: warn
- name: Show container logs on failure
if: failure()
run: docker compose -f docker/docker-compose.integration-test.yml logs --no-color
- name: Stop integration infrastructure
if: always()
run: docker compose -f docker/docker-compose.integration-test.yml down --volumes --remove-orphans