From f8a52d5c87c192dd3f9348efbee32ca41124c043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Tue, 14 May 2024 10:23:10 +0200 Subject: [PATCH] Updated actions to use Node.js 20 and migrated to docker compose v2 (#33) * Updated actions to use Node.js 20 * Migrated to Composer V2 --- .github/workflows/ci.yaml | 4 ++-- bin/ci/test.sh | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 90e2057..86cc9d9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,7 +39,7 @@ jobs: node: "18" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build image run: bin/ci/build.sh ${{ matrix.php }} ${{ matrix.node }} - name: Test image @@ -49,7 +49,7 @@ jobs: TEST_CMD: "vendor/bin/behat -v --profile=browser --suite=admin-ui --tags=@richtext --config=behat_ibexa_oss.yaml" PRODUCT_VERSION: ${{ matrix.product-version }} - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/bin/ci/test.sh b/bin/ci/test.sh index c15971e..ddac23f 100755 --- a/bin/ci/test.sh +++ b/bin/ci/test.sh @@ -71,17 +71,17 @@ export COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/redis.yml:doc/docker/sel export APP_ENV="behat" APP_DEBUG="1" export PHP_IMAGE="ibexa_php:latest-node" PHP_IMAGE_DEV="ibexa_php:latest-node" -docker-compose --env-file .env up -d --build --force-recreate +docker compose --env-file .env up -d --build --force-recreate echo '> Workaround for test issues: Change ownership of files inside docker container' -docker-compose --env-file=.env exec -T app sh -c 'chown -R www-data:www-data /var/www' +docker compose --env-file=.env exec -T app sh -c 'chown -R www-data:www-data /var/www' # Rebuild Symfony container -docker-compose --env-file=.env exec -T --user www-data app sh -c "rm -rf var/cache/*" -docker-compose --env-file=.env exec -T --user www-data app php bin/console cache:clear +docker compose --env-file=.env exec -T --user www-data app sh -c "rm -rf var/cache/*" +docker compose --env-file=.env exec -T --user www-data app php bin/console cache:clear # Install database & generate schema -docker-compose --env-file=.env exec -T --user www-data app sh -c "php /scripts/wait_for_db.php; php bin/console ibexa:install" -docker-compose --env-file=.env exec -T --user www-data app sh -c "php bin/console ibexa:graphql:generate-schema" -docker-compose --env-file=.env exec -T --user www-data app sh -c "composer run post-install-cmd" +docker compose --env-file=.env exec -T --user www-data app sh -c "php /scripts/wait_for_db.php; php bin/console ibexa:install" +docker compose --env-file=.env exec -T --user www-data app sh -c "php bin/console ibexa:graphql:generate-schema" +docker compose --env-file=.env exec -T --user www-data app sh -c "composer run post-install-cmd" -docker-compose --env-file=.env exec -T --user www-data app sh -c "php /scripts/wait_for_db.php; php bin/console cache:warmup; $TEST_CMD" +docker compose --env-file=.env exec -T --user www-data app sh -c "php /scripts/wait_for_db.php; php bin/console cache:warmup; $TEST_CMD" -docker-compose --env-file .env down -v +docker compose --env-file .env down -v