-
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
Blaize Kaye
committed
Aug 5, 2024
0 parents
commit 69442cd
Showing
22 changed files
with
12,821 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,3 @@ | ||
.git | ||
vendor | ||
web/sites/default/files |
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,2 @@ | ||
# Local project name - setting this here aligns container names with routes | ||
COMPOSE_PROJECT_NAME=drupal-base |
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,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 |
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,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 }} |
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,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 |
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,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 |
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,6 @@ | ||
name: drupal-base | ||
recipe: lagoon | ||
config: | ||
flavor: drupal | ||
build: | ||
- composer install |
Oops, something went wrong.