Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: include php logs if tests fail #812

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,22 @@ jobs:
threshold_metric: "lines"
comment_footer: false

- name: DB Logs
id: dblog
if: failure()
uses: cafuego/command-output@main
with:
run: |
docker compose -f tests/docker-compose.yml exec -T drupal drush watchdog:show

- name: PHP Logs
id: phplog
if: failure()
uses: cafuego/command-output@main
with:
run: |
docker compose -f tests/docker-compose.yml exec -T drupal grep -i fatal /var/log/php/error.log

- name: Find Comment
uses: peter-evans/find-comment@v3
if: ${{ !env.ACT }}
Expand Down Expand Up @@ -180,9 +196,13 @@ jobs:
#### PHP Code Sniffer \`${{ steps.phpcs.outcome }}\`

<details><summary>Software Versions</summary>

\`\`\`${{ steps.versions.outputs.stdout }}\`\`\`

<code>${{ steps.versions.outputs.stdout }}</code>
</details>
<details><summary>Drupal Logs</summary>
<code>${{ steps.dblog.outputs.stdout }}</code>
</details>
<details><summary>PHP Logs</summary>
<code>${{ steps.phplog.outputs.stdout }}</code>
</details>

*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Workflow: \`${{ github.workflow }}\`*`;
Expand Down