Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ commands:
build:
usage: Build project locally (single-local architecture only).
cmd: |
set -e
cat .env | grep -v "#" | grep -v -e '^$'
if [ "$1" == "y" ]; then
env $(cat .env | grep -v "#" | xargs) docker buildx bake -f docker-compose.yml --no-cache cli --load
Expand Down Expand Up @@ -105,7 +106,7 @@ commands:

test-phpunit:
usage: Run PHPUnit tests.
cmd: docker compose exec cli phpunit --testsuite govcms
cmd: docker compose exec test phpunit --testsuite govcms

test-redis:
usage: Verify redis can accept connections.
Expand Down
3 changes: 0 additions & 3 deletions .docker/Dockerfile.govcms
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ ARG GOVCMS_PROJECT_VERSION

COPY composer.* /app/

# Copy base file for extensible saas.
COPY custom /app/custom

# Install yq for YAML parsing.
RUN case $(uname -m) in x86_64) ARCH="amd64" ;; aarch64) ARCH="arm64" ;; *) ARCH="amd64" ;; esac \
&& wget -O /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/2.4.0/yq_linux_${ARCH}" \
Expand Down
2 changes: 1 addition & 1 deletion .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ X_FRAME_OPTIONS=SAMEORIGIN

# Set the version of GovCMS and Drupal Core to use - you can use a tag or branch reference (3.x-dev) here
# See https://github.com/govCMS/GovCMS/releases
GOVCMS_PROJECT_VERSION=4.2.0
GOVCMS_PROJECT_VERSION=dev-4.x-develop

# Set the Lagoon tag to use for the upstream dockerfiles (e.g. 20.12.0)
# See https://github.com/uselagoon/lagoon-images/releases
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build

on:
pull_request:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker

- name: Install Ahoy
run: |
sudo wget -q https://github.com/ahoy-cli/ahoy/releases/download/v2.1.1/ahoy-bin-linux-amd64 -O /usr/local/bin/ahoy
sudo chmod +x /usr/local/bin/ahoy

- name: Create Docker network
run: docker network create amazeeio-network || true

- name: Build
env:
COMPOSER_AUTH: ""
DOCKER_BUILDKIT: 1
run: |
cp .env.default .env
sed -i 's/GOVCMS_RELEASE_TAG=.*/GOVCMS_RELEASE_TAG=ci-test/' .env
ahoy build y

- name: Stop lagoon containers
run: docker compose down -v --remove-orphans

- name: Clone and init scaffold
run: |
git clone --depth 1 -b develop https://github.com/govCMS/scaffold.git /tmp/scaffold
cd /tmp/scaffold
ahoy init govcms saas 11

- name: Configure scaffold for CI
working-directory: /tmp/scaffold
run: |
sed -i 's/GOVCMS_IMAGE_VERSION=.*/GOVCMS_IMAGE_VERSION=ci-test/' .env
sed -i '/volumes_from:/d; /amazeeio-ssh-agent/d' docker-compose.yml

- name: Build scaffold
working-directory: /tmp/scaffold
run: ahoy build

- name: Install site
working-directory: /tmp/scaffold
run: docker compose exec -T cli drush si -y govcms --account-pass=admin

- name: Check homepage
working-directory: /tmp/scaffold
run: |
STATUS=$(docker compose exec -T test curl -s -o /dev/null -w "%{http_code}" http://nginx:8080)
echo "Homepage returned HTTP ${STATUS}"
if [ "${STATUS}" != "200" ]; then
echo "::error::Homepage returned HTTP ${STATUS}, expected 200"
docker compose exec -T test curl -s http://nginx:8080 | head -50
exit 1
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.env
auth.json
.claude
9 changes: 1 addition & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "path",
"url": "custom/composer"
}
],
"require": {
"composer/installers": "^2.0",
"cweagans/composer-patches": "^1.7",
"govcms/govcms": "dev-4.x-develop",
"govcms/govcms-custom": "*",
"govcms/scaffold-tooling": "6.0.5"
},
"require-dev": {
Expand Down Expand Up @@ -57,8 +52,7 @@
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"post-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
"DrupalComposer\\DrupalScaffold\\Plugin::scaffold"
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
],
"post-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
Expand All @@ -69,7 +63,6 @@
"drupal/core": "-p2"
},
"enable-patching": true,
"patches-file": "custom/composer/patches.json",
"installer-types": [],
"drupal-scaffold": {
"locations": {
Expand Down
6 changes: 0 additions & 6 deletions custom/composer/composer.json

This file was deleted.

4 changes: 0 additions & 4 deletions custom/composer/patches.json

This file was deleted.

14 changes: 0 additions & 14 deletions modules/README.md

This file was deleted.

Binary file removed modules/distro/.DS_Store
Binary file not shown.
3 changes: 0 additions & 3 deletions modules/distro/govcms8_foundations/README.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading