Skip to content

Commit

Permalink
Assert that deployment actually succeeds
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich committed Apr 25, 2024
1 parent 7136e51 commit 17d49a5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,26 @@ jobs:
env:
MITTWALD_SSH_PRIVATE_KEY: ${{ secrets.MITTWALD_SSH_PRIVATE_KEY }}

- name: Generate unique test file
run: |
openssl rand -hex 32 > testing.txt
- name: Run test deployment
run: |
./vendor/bin/dep deploy -vvv
env:
MITTWALD_APP_ID: ${{ secrets.MITTWALD_APP_ID }}
MITTWALD_APP_DOMAIN: ${{ secrets.MITTWALD_APP_DOMAIN }}
MITTWALD_API_TOKEN: ${{ secrets.MITTWALD_API_TOKEN }}

- name: Assert deployment was successful
run: |
deployed=$(curl -f -s https://${MITTWALD_APP_DOMAIN}/testing.txt)
expected=$(< testing.txt)
echo "::debug::got output: ${deployed}"
echo "::debug::expected: ${expected}"
test "${deployed}" = "${expected}"
env:
MITTWALD_APP_DOMAIN: ${{ secrets.MITTWALD_APP_DOMAIN }}

0 comments on commit 17d49a5

Please sign in to comment.