generated from druxt/module-template
-
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
Showing
68 changed files
with
25,261 additions
and
1,364 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,36 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main, develop ] | ||
|
||
pull_request: | ||
branches: [ main, develop ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- run: yarn | ||
|
||
- run: yarn build | ||
|
||
- run: yarn lint | ||
|
||
- run: yarn test --reporters=jest-junit --runInBand | ||
|
||
- name: Codecov | ||
uses: codecov/[email protected] |
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
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
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 |
---|---|---|
@@ -1,4 +1,92 @@ | ||
image: | ||
file: .gitpod/Dockerfile | ||
|
||
tasks: | ||
- before: git pull -f origin main:main || true | ||
init: | | ||
# Setup Gitpod .env | ||
$GITPOD_REPO_ROOT/.gitpod/scripts/env-setup.sh | ||
# Setup DDev | ||
$GITPOD_REPO_ROOT/.gitpod/scripts/ddev-download-images.sh | ||
$GITPOD_REPO_ROOT/.gitpod/scripts/ddev-setup.sh | ||
# Install Drupal | ||
$GITPOD_REPO_ROOT/.gitpod/scripts/drupal-setup.sh | ||
# Installing Nuxt | ||
$GITPOD_REPO_ROOT/.gitpod/scripts/nuxt-setup.sh | ||
# Build module | ||
cd $GITPOD_REPO_ROOT && yarn && yarn build | ||
command: | | ||
# Setup Gitpod .env | ||
$GITPOD_REPO_ROOT/.gitpod/scripts/env-setup.sh | ||
# Start DDev | ||
$GITPOD_REPO_ROOT/.gitpod/scripts/ddev-setup.sh | ||
# Add OAuth2 consumer | ||
cd $GITPOD_REPO_ROOT/example/drupal && ddev druxt-add-consumer | ||
# Setup Nuxt | ||
$GITPOD_REPO_ROOT/.gitpod/scripts/nuxt-setup.sh | ||
cd $GITPOD_REPO_ROOT | ||
# VScode xdebug extension | ||
vscode: | ||
extensions: | ||
- dbaeumer.vscode-eslint | ||
- editorconfig.editorconfig | ||
- felixfbecker.php-debug | ||
- octref.vetur | ||
- EditorConfig.EditorConfig | ||
|
||
ports: | ||
# Drupal | ||
- port: 8080 | ||
onOpen: ignore | ||
visibility: public | ||
|
||
# Nuxt/Druxt | ||
- port: 3000 | ||
onOpen: ignore | ||
visibility: public | ||
|
||
# Nuxt/Druxt | ||
- port: 3003 | ||
onOpen: ignore | ||
visibility: public | ||
|
||
# Currently un-notified and unsupported mailhog http port | ||
- port: 8025 | ||
onOpen: ignore | ||
# Currently un-notified and unsupported mailhog https port | ||
- port: 8026 | ||
onOpen: ignore | ||
# Currently un-notified and unsupported phpmyadmin http port | ||
- port: 8036 | ||
onOpen: ignore | ||
# Currently un-notified and unsupported phpmyadmin https port | ||
- port: 8037 | ||
onOpen: ignore | ||
# router http port that we're ignoring. | ||
- port: 8888 | ||
onOpen: ignore | ||
# router https port that we're ignoring. | ||
- port: 8889 | ||
onOpen: ignore | ||
# xdebug port | ||
- port: 9003 | ||
onOpen: ignore | ||
|
||
github: | ||
prebuilds: | ||
master: true | ||
branches: true | ||
pullRequests: true | ||
pullRequestsFromForks: true | ||
addCheck: true | ||
addComment: false | ||
addBadge: true | ||
addLabel: true |
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,16 @@ | ||
FROM gitpod/workspace-full | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN sudo apt-get -qq update | ||
|
||
# Install ddev | ||
RUN brew update && brew install drud/ddev/ddev | ||
|
||
# Install latest composer | ||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
RUN php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | ||
RUN sudo php composer-setup.php --install-dir /usr/bin --filename composer | ||
RUN php -r "unlink('composer-setup.php');" | ||
|
||
# Install latest npm | ||
RUN npm install -g npm |
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,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
ddev version | awk '/(drud|phpmyadmin)/ {print $2;}' >/tmp/images.txt | ||
while IFS= read -r item | ||
do | ||
docker pull "$item" | ||
done < <(cat /tmp/images.txt) |
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,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
DRUPAL_DIR="${GITPOD_REPO_ROOT}/example/drupal" | ||
|
||
# Misc housekeeping before start | ||
ddev config global --instrumentation-opt-in=true | ||
|
||
# Start ddev | ||
cd $DRUPAL_DIR && ddev start |
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,7 @@ | ||
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
|
||
DRUPAL_DIR="${GITPOD_REPO_ROOT}/example/drupal" | ||
|
||
# Set up Drupal website | ||
cd "$DRUPAL_DIR" && ddev drupal-install |
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,4 @@ | ||
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
|
||
echo -en "OAUTH_CALLBACK=https://3000-${GITPOD_WORKSPACE_ID}.${GITPOD_WORKSPACE_CLUSTER_HOST}/callback\nOAUTH_CLIENT_ID=${GITPOD_INSTANCE_ID}" > $GITPOD_REPO_ROOT/example/.env |
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,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Set up Druxt for use on gitpod | ||
|
||
set -eu -o pipefail | ||
|
||
DRUXT_DIR="${GITPOD_REPO_ROOT}/example/nuxt" | ||
|
||
# Set up Nuxt | ||
cd "$DRUXT_DIR" && echo "BASE_URL=$(gp url 8080)" > .env | ||
cd "$DRUXT_DIR" && yarn |
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 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Listen for XDebug", | ||
"type": "php", | ||
"request": "launch", | ||
"hostname": "0.0.0.0", | ||
"port": 9003, | ||
"pathMappings": { | ||
"/var/www/html": "${workspaceRoot}/example/drupal" | ||
} | ||
} | ||
] | ||
} |
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
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 DruxtJS | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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
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 @@ | ||
OAUTH_CALLBACK=http://localhost:3000/callback | ||
OAUTH_CLIENT_ID=d428854d-7d89-4756-816f-3ab1ddf7dd36 |
Oops, something went wrong.