-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
486e314
commit 5d3e627
Showing
2 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Drupal test routine | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'dev' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
test-suite: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: "0" | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build and push local | ||
uses: docker/bake-action@v5 | ||
with: | ||
load: true | ||
set: | | ||
*.platform=linux/amd64 | ||
cli.tags=drupal-base-cli:latest | ||
nginx.tags=drupal-base-nginx:latest | ||
php.tags=drupal-base-php:latest | ||
- name: replace docker-compose.yml | ||
run: | | ||
mv docker-compose.images.yml docker-compose.yml | ||
- name: Install test harness | ||
run: | | ||
yarn add leia-parser mocha chai@4 command-line-test | ||
- name: Generate test files | ||
run: | | ||
yarn leia "TESTING*.md" test -r 2 -s 'Start up tests' -t 'Verification commands' -c 'Destroy tests' --split-file | ||
- name: Run docker compose tests | ||
run: | | ||
yarn mocha --timeout 900000 test/*compose*.func.js |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
services: | ||
cli: # cli container, will be used for executing composer and any local commands (drush, drupal, etc.) | ||
hostname: cli | ||
image: drupal-base-cli:latest | ||
labels: | ||
# Lagoon Labels | ||
lagoon.type: cli-persistent | ||
lagoon.persistent.name: nginx # mount the persistent storage of nginx into this container | ||
lagoon.persistent: /app/web/sites/default/files/ # location where the persistent storage should be mounted | ||
lando.type: php-cli-drupal | ||
user: root | ||
|
||
nginx: | ||
hostname: nginx | ||
image: drupal-base-nginx:latest | ||
labels: | ||
lagoon.type: nginx-php-persistent | ||
lagoon.persistent: /app/web/sites/default/files/ # define where the persistent storage should be mounted too | ||
lando.type: nginx-drupal | ||
ports: | ||
- "8080" # exposes the port 8080 with a random local port, find it with `docker-compose port nginx 8080` | ||
user: "1000" | ||
depends_on: | ||
- cli # basically just tells docker-compose to build the cli first | ||
environment: | ||
LAGOON_LOCALDEV_URL: http://${COMPOSE_PROJECT_NAME:-drupal-base}.docker.amazee.io | ||
networks: | ||
- amazeeio-network | ||
- default | ||
|
||
php: | ||
hostname: php | ||
image: drupal-base-php:latest | ||
labels: | ||
lagoon.type: nginx-php-persistent | ||
lagoon.name: nginx # we want this service be part of the nginx pod in Lagoon | ||
lagoon.persistent: /app/web/sites/default/files/ # define where the persistent storage should be mounted too | ||
lando.type: php-fpm | ||
user: "1000" | ||
depends_on: | ||
- cli # basically just tells docker-compose to build the cli first | ||
|
||
mariadb: | ||
image: uselagoon/mariadb-10.11-drupal:latest | ||
labels: | ||
lagoon.type: mariadb | ||
lando.type: mariadb-drupal | ||
ports: | ||
- "3306" # exposes the port 3306 with a random local port, find it with `docker-compose port mariadb 3306` | ||
user: "1000" | ||
|
||
networks: | ||
amazeeio-network: | ||
external: true | ||
default: |