From a921436873a1de6e577790fb775a92ecfe0be854 Mon Sep 17 00:00:00 2001 From: John Hooks Date: Tue, 12 Dec 2023 21:09:24 -0800 Subject: [PATCH] ci: generate test files outside container --- .github/workflows/test-suite.yml | 6 +++--- bin/test-up.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 261579f..8ef97b6 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -27,11 +27,11 @@ jobs: - name: Setup docker shell: bash - run: sudo ./bin/init-pipeline.sh + run: sudo bin/test-up.sh - name: Build testing files shell: bash - run: bin/test-build.sh + run: php vendor/bin/codecept build - name: Run unit tests if: matrix.test != 'acceptance' @@ -39,7 +39,7 @@ jobs: - name: Run acceptance tests if: matrix.test == 'acceptance' - run: php ./vendor/bin/codecept run acceptance + run: php vendor/bin/codecept run acceptance - name: Upload codeception output if: ${{ failure() }} diff --git a/bin/test-up.sh b/bin/test-up.sh index 85e3a74..a632867 100755 --- a/bin/test-up.sh +++ b/bin/test-up.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash docker compose --file tests/docker-compose.yml --env-file tests/.env up --wait -docker compose --file tests/docker-compose.yml --env-file tests/.env exec -T wordpress chown www-data:www-data wp-content wp-content/plugins +docker compose --file tests/docker-compose.yml --env-file tests/.env exec -T wordpress chown -R www-data:www-data wp-content wp-content/plugins wp-content/plugins/indexed-search wp-content/plugins/indexed-search/tests wp-content/plugins/indexed-search/tests/_support wp-content/plugins/indexed-search/tests/_support/_generated wp-content/plugins/indexed-search/tests/_output docker compose --file tests/docker-compose.yml --env-file tests/.env exec -T -w /var/www/html/wp-content/plugins/indexed-search wordpress bash bin/wp-install.sh