Skip to content

Commit

Permalink
feat: Smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Jan 24, 2024
1 parent edd12a7 commit 6f3c5a8
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/smoke-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ jobs:
"beacon_api_eth_v1_events_head"
)
# Define a function that prints the last 5 logs from all docker containers that have the argument in the name
print_logs() {
for container in $(docker ps --filter name=$1 --format "{{.Names}}"); do
echo "Logs for $container:\n\n"
docker logs --tail 5 $container
echo "\n\n"
done
}
for table in "${tables[@]}"; do
echo "Checking $table table..."
for sentry in "${all_sentries[@]}"; do
Expand All @@ -89,14 +98,27 @@ jobs:
echo "$table table has data from $sentry."
break
else
echo "$table table data count for $sentry is $data_count. Checking again in 2 seconds..."
echo "$table table data count for $sentry is $data_count."
print_logs xatu-sentry
sleep 2
sleep 5
fi
done
done
done
# - name: Dump docker logs on failure
# if: always()
# uses: jwalton/gh-docker-logs@v2
- name: Collect docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
dest: './logs'
- name: Tar logs
if: failure()
run: tar cvzf ./logs.tgz ./logs
- name: Upload logs to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: logs.tgz
path: ./logs.tgz

0 comments on commit 6f3c5a8

Please sign in to comment.