Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaize Kaye committed Aug 5, 2024
0 parents commit 69442cd
Show file tree
Hide file tree
Showing 22 changed files with 12,821 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
vendor
web/sites/default/files
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Local project name - setting this here aligns container names with routes
COMPOSE_PROJECT_NAME=drupal-base
67 changes: 67 additions & 0 deletions .github/workflows/drupal-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
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: install Lando
run: |
wget https://files.lando.dev/installer/lando-x64-stable.deb
sudo dpkg --ignore-depends=docker-ce -i lando-x64-stable.deb
- name: Report versions
run: |
docker version
docker compose version
lando version
node -v
yarn -v
- name: get user ids
run: |
ls -al .
whoami
id
id -u
id -g
getent group $(id -g)
groups
- name: Update codebase to follow CI configuration
run: |
sed -i -e "/###/d" docker-compose.yml
- name: Pull all images
run: |
docker compose pull --ignore-pull-failures
- 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
# - name: Run Lando tests
# timeout-minutes: 10
# continue-on-error: true
# run: |
# yq e -i '.services.cli.overrides.environment.LANDO_WEBROOT_USER = "runner"' .lando.yml
# yq e -i '.services.cli.overrides.environment.LANDO_WEBROOT_GROUP = "docker"' .lando.yml
# yq e -i '.services.php.overrides.environment.LANDO_WEBROOT_USER = "runner"' .lando.yml
# yq e -i '.services.php.overrides.environment.LANDO_WEBROOT_GROUP = "docker"' .lando.yml
# yarn mocha --timeout 900000 test/*lando*.func.js
# - name: Show Lando logs
# continue-on-error: true
# run: |
# docker-compose -p drupalbase logs
18 changes: 18 additions & 0 deletions .github/workflows/merge-branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Sync main branch
on:
push:
branches:
- 'main'
jobs:
sync-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Merge main -> php81
uses: devmasx/merge-branch@master
with:
type: now
from_branch: main
target_branch: php81
github_token: ${{ github.token }}
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Ignore directories generated by Composer
/.drush-lock-update
/drush/Commands/contrib/
/drush/sites/lagoon.site.yml
/vendor/
/web

# Ignore directories generated by yarn
/node_modules/
/test/
/yarn.lock
/package.json

# Ignore Drupal's file directory
/web/sites/*/files/

# Ingore files that are only for the current local environment
web/sites/*/settings.local.php
web/sites/*/services.local.yml

# Ignore SimpleTest multi-site environment.
web/sites/simpletest

# Ignore files generated by PhpStorm
/.idea/
/.editorconfig
/.gitattributes
37 changes: 37 additions & 0 deletions .lagoon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
docker-compose-yaml: docker-compose.yml

project: drupal-base

tasks:
pre-rollout:
# - run:
# name: drush sql-dump
# # Takes a pre-rollout backup of production sites only.
# command: mkdir -p /app/web/sites/default/files/private/ && drush sql-dump --ordered-dump --gzip --result-file=/app/web/sites/default/files/private/pre-deploy-dump.sql.gz || true
# service: cli
# when: LAGOON_ENVIRONMENT_TYPE=="production"

post-rollout:
- run:
name: drush updb
# This will only run if the database exists.
command: |
if [[ $(drush status --field=Database) == "Connected" ]]; then drush -y updb; fi
service: cli
# - run:
# name: drush cim
# # Enable once config sync has been setup.
# command: drush -y cim
# service: cli
- run:
name: drush cr
command: drush -y cr
service: cli

environments:
main:
cronjobs:
- name: drush hourly cron
schedule: "M * * * *"
command: drush cron
service: cli
6 changes: 6 additions & 0 deletions .lando.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: drupal-base
recipe: lagoon
config:
flavor: drupal
build:
- composer install
Loading

0 comments on commit 69442cd

Please sign in to comment.