Skip to content

Commit

Permalink
Merge pull request #357 from UN-OCHA/develop
Browse files Browse the repository at this point in the history
Deploy 28-08-2024
  • Loading branch information
lazysoundsystem authored Aug 27, 2024
2 parents 85534c2 + 45d198c commit abd3564
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 143 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,21 @@ jobs:
env:
fail-fast: true

- name: Run tests
id: tests
- name: Import test content
id: import
continue-on-error: true
uses: cafuego/command-output@main
with:
run: |
docker compose -f tests/docker-compose.yml exec -T drupal drush -y en dblog
docker compose -f tests/docker-compose.yml exec -T drupal drush en yaml_content -y
docker compose -f tests/docker-compose.yml exec -T drupal drush yaml-content-import /srv/www/tests
- name: Make directories
id: dirs
uses: cafuego/command-output@main
with:
run: |
docker compose -f tests/docker-compose.yml exec -T drupal chmod -R 777 /srv/www/html/sites/default/files /srv/www/html/sites/default/private
docker compose -f tests/docker-compose.yml exec -T drupal mkdir -p /srv/www/html/build/logs
docker compose -f tests/docker-compose.yml exec -T drupal chmod -R 777 /srv/www/html/build/logs
Expand All @@ -146,6 +153,14 @@ jobs:
docker compose -f tests/docker-compose.yml exec -T drupal chmod -R 777 /srv/www/coverage
docker compose -f tests/docker-compose.yml exec -T drupal mkdir -p /srv/www/html/sites/simpletest
docker compose -f tests/docker-compose.yml exec -T drupal chmod -R 777 /srv/www/html/sites/simpletest
env:
fail-fast: true

- name: Run tests
id: tests
uses: cafuego/command-output@main
with:
run: |
docker compose -f tests/docker-compose.yml exec -u appuser -T -w /srv/www -e XDEBUG_MODE=coverage -e BROWSERTEST_OUTPUT_DIRECTORY=/srv/www/html/sites/default/files/browser_output -e DTT_BASE_URL=http://127.0.0.1 -e SIMPLETEST_BASE_URL=http://127.0.0.1 drupal ./vendor/bin/phpunit --coverage-clover /srv/www/html/build/logs/clover.xml --debug
env:
fail-fast: true
Expand Down Expand Up @@ -175,6 +190,14 @@ jobs:
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 @@ -207,6 +230,9 @@ jobs:
<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 }}`*
edit-mode: replace
Expand Down
Loading

0 comments on commit abd3564

Please sign in to comment.