Test drupal setup #102
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test drupal setup | |
| on: | |
| repository_dispatch: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - '6.**' | |
| pull_request: | |
| types: [opened, reopened, edited] | |
| jobs: | |
| test-drupal-setup: | |
| name: Build and install drupal project | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup PHP | |
| uses: drunomics/setup-php@v2 | |
| with: | |
| php-version: '8.1' | |
| - name: "Determine composer cache directory" | |
| id: "determine-composer-cache-directory" | |
| run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT | |
| - name: "Cache dependencies installed with composer" | |
| uses: actions/cache@v4 | |
| with: | |
| path: "${{ steps.determine-composer-cache-directory.outputs.directory }}" | |
| key: ${{ runner.os }}-composer-v1-${{ hashFiles('./composer.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer-v1 | |
| - name: Install composer dependencies. | |
| run: | | |
| composer config platform-check false | |
| composer config --no-plugins allow-plugins.phpstan/extension-installer true | |
| composer create-project | |
| composer install | |
| - name: Setup the environment | |
| run: | | |
| vendor/bin/phapp setup localdev | |
| - name: Setup docker containers | |
| shell: 'script -q -e -c "bash {0}"' | |
| run: | | |
| export COMPOSE_DEFAULT_USER=$(id -u $USER) | |
| docker compose up -d | |
| echo "Waiting for mysql to come up..." && docker exec -it $(docker compose ps -q cli) /bin/bash -c "while ! echo exit | nc mariadb 3306; do sleep 1; done" >/dev/null | |
| - name: Install the project | |
| shell: 'script -q -e -c "bash {0}"' | |
| run: | | |
| docker compose exec cli phapp install --no-build | |
| - name: Check connection and response of the site | |
| run: | | |
| curl -v http://example.drupal-project.localdev.space | grep "Drupal 10" |