Docker Compose Test (AirDC++) #912
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
name: "Docker Compose Test (AirDC++)" | |
on: | |
pull_request: | |
branches: master | |
push: | |
branches: master | |
schedule: | |
- cron: "0 8 * * *" | |
env: | |
TARGET_SERVICE: airdcpp | |
TARGET_TIMEOUT: 45 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: "Git: Checkout" | |
uses: actions/checkout@v3 | |
- | |
name: "Service: Setup" | |
run: | | |
mkdir -p "${TARGET_SERVICE}/data/openvpn" | |
cp -r .github/workflows/config/vpn "${TARGET_SERVICE}/data/openvpn/config" | |
cp .github/workflows/config/options.conf "${TARGET_SERVICE}/options.override.conf" | |
cp .github/workflows/config/options.conf "traefik/options.override.conf" | |
- | |
name: "Service: Start" | |
run: | | |
./compositions.sh up --labels NEVER ${TARGET_SERVICE} | |
- | |
name: "Service: Wait" | |
run: | | |
cd ${TARGET_SERVICE} ; cat .env | |
sleep ${TARGET_TIMEOUT}s | |
- | |
name: "Service: Test" | |
run: | | |
if ! ./compositions.sh check ${TARGET_SERVICE}; then | |
docker ps | |
cd ${TARGET_SERVICE} ; docker-compose logs | |
exit 1 | |
fi | |
- | |
name: "Service: Restart with Traefik" | |
run: | | |
./compositions.sh up traefik | |
./compositions.sh down,up ${TARGET_SERVICE} | |
- | |
name: "Service: Wait" | |
run: | | |
sleep ${TARGET_TIMEOUT}s ; sleep ${TARGET_TIMEOUT}s | |
- | |
name: "Service: Test with Traefik" | |
run: | | |
if ! ./compositions.sh check ${TARGET_SERVICE} traefik; then | |
docker ps | |
cd ${TARGET_SERVICE} ; docker-compose logs | |
cd traefik ; docker-compose logs | |
exit 1 | |
fi | |
#TODO: websocket test | |
#docker-compose exec -T traefik wget --spider --no-check-certificate https://localhost/airdcpp/ \ | |
# || (docker ps ; docker-compose logs ; cd ../airdcpp ; docker-compose logs ; exit 1) |