Skip to content

ci(podman): more verbose output of JSON responses #15

ci(podman): more verbose output of JSON responses

ci(podman): more verbose output of JSON responses #15

Workflow file for this run

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 system service --time=0 unix:///tmp/podman.sock &
cp misc/asu.env .env
podman-compose up -d
- name: Let the containers start
run: sleep 30
- name: Test startup
run: |
curl -s http://localhost:8000/api/v1/stats | tee response.json | jq
[ "$(jq -r '.queue_length' response.json)" -eq 0 ] || exit 1
- name: Test build
run: |
for i in {1..20}; do
curl 'http://localhost:8000/api/v1/build' \
--request 'POST' \
--header 'Content-Type: application/json' \
--data @tests/ci/openwrt-one-24.10.0.json | tee response.json | jq
if [ "$(jq -r '.status' response.json)" -eq 200 ]; then
break
fi
if [ $i -eq 20 ]; then
exit 1
fi
sleep 10
done