Skip to content

Commit

Permalink
Merge branch '1.x-2.x' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ronan committed Jan 25, 2025
2 parents 635bfc7 + 99eef82 commit 31f8167
Show file tree
Hide file tree
Showing 130 changed files with 9,716 additions and 2,795 deletions.
69 changes: 69 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// See: https://www.drupal.org/docs/develop/development-tools/editors-and-ides/configuring-visual-studio-code
{
"name": "${localWorkspaceFolderBasename} - Dev Container",
"dockerComposeFile": "../compose.yml",
"service": "php",
"workspaceFolder": "/workspace",
"postStartCommand": "install-app",
"forwardPorts": [8888],
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/node:1": {}
},
"overrideFeatureInstallOrder": [
"ghcr.io/devcontainers/features/common-utils"
],
"customizations": {
"vscode": {
"settings": {
"php.validate.executablePath": "/usr/local/bin/php",
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#8C1515",
"titleBar.activeForeground": "#ffffff",
"titleBar.inactiveBackground": "#B83A4B",
"titleBar.inactiveForeground": "#82828299"
},
"files.exclude": {
".*": true,
"**/.git": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
},
"cSpell.enabled": true,
"cSpell.words": [
"devcontainer",
"backstop",
"devcontainer",
"preprocess",
"proot",
"reqs",
"viewports",
"yamls",
"zcat",
"devel"
],
"files.associations": {
"*.inc": "php",
"*.module": "php",
"*.theme": "php",
"*.install": "php"
},
"[php]": {},
"workbench.startupEditor": "none",
"terminal.integrated.defaultProfile.linux": "zsh",
"editor.tabSize": 2
},
"extensions": [
"xdebug.php-debug",
"bmewburn.vscode-intelephense-client",
"mrmlnc.vscode-apache",
"streetsidesoftware.code-spell-checker",
"EditorConfig.EditorConfig",
"ms-azuretools.vscode-docker",
"yzhang.markdown-all-in-one",
"bradlc.vscode-tailwindcss",
"github.vscode-github-actions"
]
}
}
}
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.devcontainer
.github
.vscode
.git
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build Theme Artifacts
run-name: Decanter artifact build 🛠️
on: [push]
permissions:
contents: write
jobs:
Build-Artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install npm
uses: actions/setup-node@v4
- run: npm install
- run: npm run build
- name: Commit artifacts
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name '${{ github.actor }}'
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
git commit -am "Automated artifact build by Github Actions"
git push
fi
22 changes: 22 additions & 0 deletions .github/workflows/capture.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Capture Theme Changes
run-name: Capturing visual reference 👓
on: [push]
permissions:
contents: write
jobs:
Capture-Reference:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Execute backstop reference
run: |
docker compose run backstop reference --config=/config.js
- name: Commit results
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name '${{ github.actor }}'
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
git add --all .ops/output/vrt/*
git commit -am "Automated reference image capture by Github Actions"
git push
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
yarn.lock
.DS_Store
.vscode/settings.json
54 changes: 54 additions & 0 deletions .ops/backstop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
module.exports = {
"viewports": [
{
"label": "desktop",
"width": 1920,
"height": 1080
},
{
"label": "mobile",
"width": 360,
"height": 800
}
],
"scenarios": [],
"paths": {
"engine_scripts": "/scripts",
"html_report": "/output/report",
"bitmaps_reference": "/output/approved",
"bitmaps_test": "/output/test",
},
"report": ["browser","json"],
"engine": "playwright",
"onReadyScript": "onReady.js",
"engineOptions": {
"browser": "chromium"
},
"misMatchThreshold": 0.5,
"asyncCaptureLimit": 1,
"asyncCompareLimit": 10,
"resembleOutputOptions": {
"ignoreAntialiasing": true,
"usePreciseMatching": true
},
"debug": false,
"debugWindow": false,
"scenarioLogsInReports": true,
"fileNameTemplate": '{scenarioLabel}--{viewportLabel}',
}

try {
require('fs')
.readFileSync('/urls.txt', 'utf-8')
.split(/\n/)
.forEach((url) => {
module.exports.scenarios.push(
{
"label": url.split(/\s+/).pop().trim(),
"url": `http://app${url.split(/\s+/)[0]}`,
}
);
});
} catch (err) {
console.log(err);
}
4 changes: 4 additions & 0 deletions .ops/output/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This directory is for the permanently stored output of tests.

A lot of test results are commited to the repo to create a more thorough and reliable
history that is independent of where the tests are run.
Binary file added .ops/output/vrt/approved/--desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .ops/output/vrt/approved/--mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .ops/output/vrt/approved/Events--desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .ops/output/vrt/approved/Events--mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .ops/output/vrt/approved/Home--desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .ops/output/vrt/approved/Home--mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .ops/output/vrt/approved/Menus--desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .ops/output/vrt/approved/Menus--mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 31f8167

Please sign in to comment.