Skip to content

Commit

Permalink
tests: Always exfil artefacts.
Browse files Browse the repository at this point in the history
  • Loading branch information
cafuego committed Dec 10, 2024
1 parent e08f117 commit 6d10496
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,25 @@ jobs:
docker compose -f tests/docker-compose.yml exec -T drupal mkdir -p /srv/www/html/build/logs /srv/www/html/build/output
docker compose -f tests/docker-compose.yml exec -T drupal chmod -R 777 /srv/www/html/build/logs /srv/www/html/build/output
docker compose -f tests/docker-compose.yml exec -T -w /srv/www -e XDEBUG_MODE=coverage -e BROWSERTEST_OUTPUT_DIRECTORY=/srv/www/html/build/output -e SIMPLETEST_BASE_URL=http://127.0.0.1 -e DTT_BASE_URL=http://127.0.0.1 drupal ./vendor/bin/phpunit --coverage-clover /srv/www/html/build/logs/clover.xml --debug
docker cp "$(docker compose -f tests/docker-compose.yml ps -q drupal)":/srv/www/html/build/logs/clover.xml .
docker cp "$(docker compose -f tests/docker-compose.yml ps -q drupal)":/srv/www/html/build/output .
env:
fail-fast: true

- name: Exfiltrate
id: exfil
if: failure() || success()
uses: cafuego/command-output@main
with:
run: |
docker cp "$(docker compose -f tests/docker-compose.yml ps -q drupal)":/srv/www/html/build/logs/clover.xml .
docker cp "$(docker compose -f tests/docker-compose.yml ps -q drupal)":/srv/www/html/build/output .
- name: Attach Artifacts
id: artifacts
if: failure()
if: failure() || success()
uses: actions/upload-artifact@v4
with:
name: browsertest-output
path: output/
path: output/**

- name: Monitor coverage
uses: slavcodev/coverage-monitor-action@v1
Expand All @@ -176,7 +183,7 @@ jobs:
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
docker compose -f tests/docker-compose.yml exec -T drupal grep -r -i fatal /var/log/php
- name: Find Comment
uses: peter-evans/find-comment@v3
Expand Down

0 comments on commit 6d10496

Please sign in to comment.