-
Notifications
You must be signed in to change notification settings - Fork 88
60 lines (47 loc) · 1.5 KB
/
podman.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
name: Test podman-compose.yml
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
TERM: xterm-color
PY_COLORS: 1
LOG_LEVEL: DEBUG
jobs:
build:
runs-on: ubuntu-latest
name: podman-compose integration test
steps:
- uses: actions/checkout@v4
- name: Install ImageBuilder prereqs
run: sudo apt-get install -y podman-compose jq
- name: Build the containers
run: |
podman-compose build
- name: Start the containers
run: |
podman-compose up -d
- name: Let the containers start
run: sleep 10
- name: Test startup
run: |
queue_length="$(curl -s http://localhost:8000/api/v1/stats | jq .queue_length)"
[ "$queue_length" -eq 0 ] || exit 1
- name: Test build
run: |
curl 'http://localhost:8000/api/v1/build' \
--request 'POST' \
--header 'Content-Type: application/json' \
--data @ tests/ci/openwrt-one-24.10.0.json > build_response.json
status_code=$(jq -r '.status' build_response.json)
[ "$status_code" -eq 202 ] || exit 1
sleep 30
curl 'http://localhost:8000/api/v1/build' \
--request 'POST' \
--header 'Content-Type: application/json' \
--data @ tests/ci/openwrt-one-24.10.0.json > build_response.json
status_code=$(jq -r '.status' build_response.json)
[ "$status_code" -eq 200 ] || exit 1