Skip to content

Commit

Permalink
test in the same job
Browse files Browse the repository at this point in the history
  • Loading branch information
chottuthejimmy committed Dec 16, 2024
1 parent 1c4e05c commit 33f3881
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/testdriver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,30 @@ jobs:
tar xvzf ngrok.tgz
./ngrok authtoken ${{ secrets.NGROK_AUTH_TOKEN }}
./ngrok http 8080 > ngrok.log &
sleep 5
sleep 20
APP_URL=$(curl --silent http://127.0.0.1:4040/api/tunnels | jq -r .tunnels[0].public_url)
echo "Generated URL: $APP_URL"
echo "app_url=$APP_URL" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
- name: Debug ngrok logs
run: cat ngrok.log
- name: Test Against URL
run: |
# Since we are still in the same job, ngrok is still running
curl "$APP_URL/health-check"
test_url:
name: "Test URL"
runs-on: ubuntu-latest
needs: [start_container]
steps:
- run: |
echo "Received URL: ${{needs.start_container.outputs.app_url}}"
if [ -z "${{needs.start_container.outputs.app_url}}" ]; then
echo "Error: URL is empty"
exit 1
fi
curl "${{needs.start_container.outputs.app_url}}/health-check"
# test_url:
# name: "Test URL"
# runs-on: ubuntu-latest
# needs: [start_container]
# steps:
# - run: |
# echo "Received URL: ${{needs.start_container.outputs.app_url}}"
# if [ -z "${{needs.start_container.outputs.app_url}}" ]; then
# echo "Error: URL is empty"
# exit 1
# fi
# curl "${{needs.start_container.outputs.app_url}}/health-check"
# test:
# name: "TestDriver"
# runs-on: ubuntu-latest
Expand Down

0 comments on commit 33f3881

Please sign in to comment.