Skip to content

Commit

Permalink
Add logs to artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamara committed Dec 24, 2024
1 parent 6c45e9c commit c9c6ccb
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,25 @@ jobs:
with:
name: html-report
path: test-report
- name: Copy Logs from Container

- name: Copy Adyen logs if available
if: always()
run: |
# Create a local directory for logs
mkdir -p logs
# Copy logs from Shopware container to the host
docker cp shopware6:~/html/var/log/adyen/api.log logs
# Check if the log file exists in the container
if docker exec shopware6 test -f /var/www/html/var/log/adyen/api.log; then
echo "Log file exists. Copying..."
docker cp shopware6:/var/www/html/var/log/adyen/api.log logs
else
echo "Log file does not exist. Skipping copy."
# Create an empty file to avoid upload step failing
touch logs/api.log
fi
shell: bash

- name: Upload Adyen api Logs
- name: Upload Adyen API Logs
if: always()
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit c9c6ccb

Please sign in to comment.