Skip to content

Commit

Permalink
Do the zipping in the right place during CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
townxelliot committed Jan 15, 2025
1 parent 4188342 commit 513c26e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/_unit-tests-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ jobs:
run: |
APP_ENV=dev APP_DEBUG=0 docker compose -f docker-compose.yml -f docker-compose.unit-tests-client.yml up -d --no-deps client-unit-tests pact-mock
sleep 3
docker compose -f docker-compose.yml -f docker-compose.unit-tests-client.yml exec -T client-unit-tests chown root /tmp/commonpasswords.txt
docker compose -f docker-compose.yml -f docker-compose.unit-tests-client.yml exec -T client-unit-tests sh scripts/client-unit-tests.sh
docker compose -f docker-compose.yml -f docker-compose.unit-tests-client.yml exec -T client-unit-tests chmod -R 777 tests/phpunit/coverage/client-unit-tests.xml
docker compose -f docker-compose.yml -f docker-compose.unit-tests-client.yml exec -T client-unit-tests chmod -R 777 tests/phpunit/coverage
docker cp "client-unit-tests-app:/var/www/tests/phpunit/coverage/client-unit-tests.xml" "./client-unit-tests.xml"
docker cp "client-unit-tests-app:/var/www/tests/phpunit/coverage/client-unit-tests-html" "./client-unit-tests-html"
zip -r client-unit-tests-html.zip client-unit-tests-html
docker compose -f docker-compose.yml -f docker-compose.unit-tests-client.yml exec -T pact-mock cat /tmp/pacts/complete_the_deputy_report-opg_data.json > pact.json
docker compose -f docker-compose.yml -f docker-compose.unit-tests-client.yml down
Expand Down
4 changes: 1 addition & 3 deletions client/app/scripts/client-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ php vendor/bin/phpunit -c tests/phpunit --coverage-php tests/phpunit/coverage/cl

php vendor/phpunit/phpcov/phpcov merge --clover "./tests/phpunit/coverage/client-unit-tests.xml" "./tests/phpunit/coverage"

php vendor/phpunit/phpcov/phpcov merge --html "./tests/phpunit/coverage/client-unit-tests" "./tests/phpunit/coverage"

python "import shutil; shutil.make_archive('client-unit-tests.html.zip', 'zip', './tests/phpunit/coverage/client-unit-tests')"
php vendor/phpunit/phpcov/phpcov merge --html "./tests/phpunit/coverage/client-unit-tests-html" "./tests/phpunit/coverage"

0 comments on commit 513c26e

Please sign in to comment.