-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): automatically test podman-compose.yml
Make sure it's easy for other people to run their own server. Signed-off-by: Paul Spooren <[email protected]>
- Loading branch information
Showing
4 changed files
with
156 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
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: | | ||
cp misc/asu.env .env | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
ALLOW_DEFAULTS=1 | ||
CONTAINER_HOST=unix:///run/user/1000/podman/podman.sock | ||
CONTAINER_SOCK=/run/user/1000/podman/podman.sock | ||
PUBLIC_PATH=/home/openwrt/public/ | ||
PUBLIC_PATH=/tmp/public/ | ||
REDIS_URL=redis://redis/ | ||
SERVER_STATS=stats | ||
SQUID_CACHE=1 | ||
# SERVER_STATS=stats | ||
# SQUID_CACHE=1 | ||
# ALLOW_DEFAULTS=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"profile": "openwrt_one", | ||
"target": "mediatek/filogic", | ||
"packages": [ | ||
"base-files", | ||
"ca-bundle", | ||
"dnsmasq", | ||
"dropbear", | ||
"firewall4", | ||
"fitblk", | ||
"fstools", | ||
"kmod-crypto-hw-safexcel", | ||
"kmod-gpio-button-hotplug", | ||
"kmod-leds-gpio", | ||
"kmod-nft-offload", | ||
"kmod-phy-aquantia", | ||
"libc", | ||
"libgcc", | ||
"libustream-mbedtls", | ||
"logd", | ||
"mtd", | ||
"netifd", | ||
"nftables", | ||
"odhcp6c", | ||
"odhcpd-ipv6only", | ||
"opkg", | ||
"ppp", | ||
"ppp-mod-pppoe", | ||
"procd-ujail", | ||
"uboot-envtools", | ||
"uci", | ||
"uclient-fetch", | ||
"urandom-seed", | ||
"urngd", | ||
"wpad-basic-mbedtls", | ||
"kmod-mt7915e", | ||
"kmod-mt7981-firmware", | ||
"mt7981-wo-firmware", | ||
"kmod-rtc-pcf8563", | ||
"kmod-usb3", | ||
"kmod-nvme", | ||
"kmod-phy-airoha-en8811h", | ||
"luci" | ||
], | ||
"defaults": "", | ||
"version_code": "r28427-6df0e3d02a", | ||
"version": "24.10.0", | ||
"diff_packages": true, | ||
"client": "ci" | ||
} |