Skip to content

Commit

Permalink
Update hw25-ci-cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vyefremov committed Jun 23, 2024
1 parent aea3dc5 commit e46dfb2
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/hw25-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
name: Integration Tests
if: false # Remove this line to enable the job
needs:
- version
- unit-tests
runs-on: ubuntu-latest
services:
Expand Down Expand Up @@ -78,8 +77,8 @@ jobs:
name: Build and Push Docker Image
needs:
- version
# - unit-tests
# - integration-tests
- unit-tests
- integration-tests
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -131,4 +130,22 @@ jobs:
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/hw25-webapi:${{ env.VERSION }}
docker run -d --name hw25-webapi -p 8080:8080 ${{ secrets.DOCKERHUB_USERNAME }}/hw25-webapi:${{ env.VERSION }}
'
post-deployment-tests:
name: Post Deployment Tests
needs:
- version
- deploy-to-staging
runs-on: ubuntu-latest
steps:
- name: Run Post Deployment Tests
env:
VERSION: ${{ needs.version.outputs.fullSemVer }}
run: |
ACTUAL_VERSION=$(curl -sS -X GET ${{ secrets.AWS_HOST }}/api/v1/version)
echo "Actual Version: $ACTUAL_VERSION"
if [ "$ACTUAL_VERSION" != "${{ env.VERSION }}" ]; then
echo "Deployment failed"
exit 1
fi

0 comments on commit e46dfb2

Please sign in to comment.