Skip to content

Commit

Permalink
Create smoke_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayank77maruti authored Dec 4, 2024
1 parent f58715f commit 48f1d79
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/smoke_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Smoke Test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-smoke-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build Docker image
run: docker build -t phoenix-app .

- name: Run Docker container
run: |
docker run -d --name phoenix-container -p 3000:80 phoenix-app
sleep 10 # Give some time for the container to start
- name: Smoke test
run: |
# Example smoke test using curl
curl --fail http://localhost:3000/ || (docker logs phoenix-container && exit 1)
- name: Cleanup
run: |
docker stop phoenix-container
docker rm phoenix-container

0 comments on commit 48f1d79

Please sign in to comment.