diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml index 535dc82b..2287bfbc 100644 --- a/.github/workflows/artifact.yml +++ b/.github/workflows/artifact.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine + image: ghcr.io/city-of-helsinki/drupal-web:8.3 services: db: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f7eb84b9..9ae35ace 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,13 +5,12 @@ on: name: CI env: SYMFONY_DEPRECATIONS_HELPER: disabled - SIMPLETEST_BASE_URL: http://app:8888 jobs: tests: runs-on: ubuntu-latest container: - image: ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine - options: --hostname app + image: ghcr.io/city-of-helsinki/drupal-web:8.3 + options: --hostname app --user 1001 services: db: @@ -26,6 +25,13 @@ jobs: steps: - uses: actions/checkout@v4 + # Actions worker overrides the default entrypoint with "tail -f /dev/null", so + # we have to start services manually. + - name: Start services + env: + WEBROOT: ${{ github.workspace }}/public + run: entrypoint & + - name: Set browsertest output folder run: | echo "BROWSERTEST_OUTPUT_DIRECTORY=$GITHUB_WORKSPACE/public/sites/simpletest" >> $GITHUB_ENV @@ -69,10 +75,7 @@ jobs: - name: Start services run: | - drush runserver $SIMPLETEST_BASE_URL --dns > /dev/null 2>&1 & - - # Wait for drush server to start. - for i in {1..5}; do RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" "$SIMPLETEST_BASE_URL" || true); if [ "$RESPONSE_CODE" -gt "301" ] || [ "$RESPONSE_CODE" -lt "200" ]; then sleep 2; fi; done + for i in {1..5}; do RESPONSE_CODE=$(curl -k -s -o /dev/null -w "%{http_code}" "$SIMPLETEST_BASE_URL" || true); if [ "$RESPONSE_CODE" -gt "301" ] || [ "$RESPONSE_CODE" -lt "200" ]; then sleep 2; fi; done - name: Run PHPUnit tests run: | diff --git a/.github/workflows/update-config.yml b/.github/workflows/update-config.yml index d36258dd..64af8562 100644 --- a/.github/workflows/update-config.yml +++ b/.github/workflows/update-config.yml @@ -9,7 +9,8 @@ jobs: update-config: runs-on: ubuntu-latest container: - image: ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine + image: ghcr.io/city-of-helsinki/drupal-web:8.3 + options: --hostname app --user 1001 services: db: image: mysql:8