reordered steps

This commit is contained in:
Christoph Kluge 2021-08-06 14:20:07 +02:00
parent 23276293df
commit 9308856f69
2 changed files with 17 additions and 11 deletions

View File

@ -14,7 +14,7 @@ do
echo "... Success!" echo "... Success!"
break break
else else
echo "... No response!" echo "... Bad response!"
fi fi
if [ $x -lt $attempts ] if [ $x -lt $attempts ]

View File

@ -16,7 +16,7 @@ jobs:
timeout-minutes: 10 timeout-minutes: 10
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Runs a single command using the runners shell # Checkout latest cc-docker, build and start containers
- name: Checkout latest cc-docker - name: Checkout latest cc-docker
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -26,27 +26,33 @@ jobs:
- name: Run containers - name: Run containers
run: docker-compose -f "docker-compose.yml" up -d run: docker-compose -f "docker-compose.yml" up -d
# Allow entrypoint of cc-php to load, then show container status and start accessTest
- name: Giving containers 60s to load - name: Giving containers 60s to load
run: sleep 60s run: sleep 60s
- name: Show containers - name: Show containers
run: docker ps -a run: docker ps -a
- name: Get log from cc-nginx
run: docker logs cc-nginx
- name: Get log from cc-redis
run: docker logs cc-redis
- name: Get log from cc-db
run: docker logs cc-db
- name: Attempt to curl localhost:80/login - name: Attempt to curl localhost:80/login
run: | run: |
chmod +x ./.github/accessTest.sh chmod +x ./.github/accessTest.sh
./.github/accessTest.sh ./.github/accessTest.sh
# Get logs and stop containers independent from accessTest result
- name: Get log from cc-nginx
if: always()
run: docker logs cc-nginx
- name: Get log from cc-redis
if: always()
run: docker logs cc-redis
- name: Get log from cc-db
if: always()
run: docker logs cc-db
- name: Get log from cc-php - name: Get log from cc-php
if: always()
run: docker logs cc-php run: docker logs cc-php
- name: Stop containers - name: Stop containers