fix: DEV-2107: Make setup-base.sh not create self-referencing link #86
Workflow file for this run
This file contains 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] | |
jobs: | |
test-drupal-setup: | |
name: Build and install drupal project | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
run: | | |
sudo update-alternatives --set php /usr/bin/php8.1 | |
- name: "Determine composer cache directory" | |
id: "determine-composer-cache-directory" | |
run: "echo \"::set-output name=directory::$(composer config cache-dir)\"" | |
- name: "Cache dependencies installed with composer" | |
uses: actions/[email protected] | |
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 docker-compose. | |
run: | | |
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} | |
mkdir -p $DOCKER_CONFIG/cli-plugins | |
curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose | |
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose | |
docker-compose version | |
- name: Install composer dependencies. | |
run: | | |
composer config platform-check false | |
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 9" |