Move from running yq in CI to using a compose.ci.yml

This commit is contained in:
Matthew Lopez
2024-05-10 20:05:42 -04:00
parent c52a802b7d
commit f7c906fa0b
2 changed files with 67 additions and 7 deletions

65
.github/compose.ci.yml vendored Normal file
View File

@@ -0,0 +1,65 @@
# Trying to expose ports in GitHub Actions causes a "bind: address already in use" error
# Testing whether any containers exit in CI requires disabling restarts
# Every service must be added to this file to make CI work correctly
services:
mitmproxy-pretendo:
restart: no
ports: !reset []
coredns-internal:
restart: no
ports: !reset []
nginx:
restart: no
ports: !reset []
mongodb:
restart: no
ports: !reset []
mongo-express:
restart: no
ports: !reset []
minio:
restart: no
ports: !reset []
redis:
restart: no
ports: !reset []
redis-commander:
restart: no
ports: !reset []
maildev:
restart: no
ports: !reset []
postgres:
restart: no
ports: !reset []
adminer:
restart: no
ports: !reset []
account:
restart: no
ports: !reset []
website:
restart: no
ports: !reset []
friends:
restart: no
ports: !reset []
miiverse-api:
restart: no
ports: !reset []
juxtaposition-ui:
restart: no
ports: !reset []
boss:
restart: no
ports: !reset []
wiiu-chat-authentication:
restart: no
ports: !reset []
wiiu-chat-secure:
restart: no
ports: !reset []
super-mario-maker:
restart: no
ports: !reset []

View File

@@ -20,17 +20,12 @@ jobs:
- name: Set TERM environment variable
run: echo "TERM=xterm" >> "$GITHUB_ENV"
# Trying to expose ports in GitHub Actions causes a "bind: address already in use" error
- name: Remove exposed ports configuration
run: yq eval "del(.services.*.ports)" -i compose.yml
- name: Apply Docker Compose CI overrides
run: ln -s compose.override.yml .github/compose.ci.yml
- name: Run the setup script
run: ./setup.sh --server-ip 127.0.0.1 --force
# Testing whether any containers exit requires disabling restarts
- name: Remove container restart configuration
run: yq eval "del(.services.*.restart)" -i compose.yml
- name: Test starting the servers
run: |
docker compose up -d