-
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
143 changed files
with
3,966 additions
and
5,763 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
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,17 @@ | ||
#!/bin/sh | ||
|
||
set -eu | ||
|
||
cp .env.github .env | ||
|
||
export PATH="$(pwd)/vendor/bin:$PATH" | ||
|
||
composer run vendor-install | ||
composer install | ||
composer wp-install | ||
|
||
if [ "$(wp-install --status)" = "full" ]; then | ||
wp-install --serve & | ||
fi | ||
|
||
composer test |
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,73 @@ | ||
# This is a basic workflow that is manually triggered | ||
|
||
name: Free repo sync | ||
|
||
# Controls when the action will run. Workflow runs when manually triggered using the UI | ||
# or API. | ||
on: | ||
workflow_dispatch: | ||
# Inputs the workflow accepts. | ||
inputs: | ||
free_pat: | ||
# Friendly description to be shown in the UI instead of 'name' | ||
description: 'Personal access token for the free plugin repository' | ||
# Default value if no value is explicitly provided | ||
default: '' | ||
# Input has to be provided for the workflow to run | ||
required: true | ||
source_branch: | ||
description: 'Source branch' | ||
default: 'develop' | ||
required: true | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "greet" | ||
sync: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Runs a single command using the runners shell | ||
- name: Check out the premium plugin repository | ||
uses: actions/checkout@v2 | ||
with: | ||
path: premium | ||
ref: ${{ github.event.inputs.source_branch }} | ||
- name: Check out the free plugin repository | ||
uses: actions/checkout@v2 | ||
with: | ||
path: free | ||
ref: develop | ||
repository: WPWhiteSecurity/wp-2fa | ||
- name: Setup node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
- name: Install node dependencies | ||
run: rm -rf node_modules; rm package-lock.json; rm TESTS.MD; npm cache clear --force; npm install; npm run vendor:install; npm run prod -- | ||
working-directory: premium | ||
- name: Convert premium plugin to free version | ||
run: npm run-script convert:free | ||
working-directory: premium | ||
- name: Remove premium translation files and other premium only files | ||
run: rm -Rf extensions freemius languages | ||
working-directory: premium | ||
- name: Substitute Year in code | ||
run: gulp substitute-year | ||
working-directory: premium | ||
- name: Generate POT file for the free edition | ||
run: gulp translate | ||
working-directory: premium | ||
- name: Sync changes from premium to free plugin in action workspace | ||
# third-party is also excluded as it currently does not seem to be working | ||
run: rsync -arvz --delete --exclude "/third-party" --exclude "/node_modules" --exclude "/.git" --exclude "/.github" --exclude "/*.json" --exclude "/*.js" --exclude "/*.md" --exclude "/*.sh" --exclude "/readme.txt" --exclude "/docker" --exclude "codeception*.yml" premium/ free | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
title: 'Automated sync from the premium version of the plugin' | ||
commit-message: '[create-pull-request] automated changes sync' | ||
path: free | ||
token: ${{ github.event.inputs.free_pat }} | ||
branch-suffix: random |
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,33 @@ | ||
name: Run tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
services: | ||
mariadb: | ||
image: mariadb | ||
ports: | ||
- 3306:3306 | ||
env: | ||
MYSQL_ROOT_PASSWORD: root | ||
# Ensure docker waits for mariadb to start | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- uses: actions/cache@v1 | ||
id: cache-composer | ||
with: | ||
path: ~/.composer/cache | ||
key: ${{ runner.os }}-composer | ||
|
||
- uses: actions/cache@v1 | ||
id: cache-wp-cli | ||
with: | ||
path: ~/.wp-cli/cache | ||
key: ${{ runner.os }}-wp-cli | ||
|
||
- name: Run tests | ||
run: .github/run-tests |
Empty file.
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,45 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Listen for Xdebug", | ||
"type": "php", | ||
"request": "launch", | ||
"port": 9001 | ||
}, | ||
{ | ||
"name": "Launch currently open script", | ||
"type": "php", | ||
"request": "launch", | ||
"program": "${file}", | ||
"cwd": "${fileDirname}", | ||
"port": 0, | ||
"runtimeArgs": [ | ||
"-dxdebug.start_with_request=yes" | ||
], | ||
"env": { | ||
"XDEBUG_MODE": "debug,develop", | ||
"XDEBUG_CONFIG": "client_port=${port}" | ||
} | ||
}, | ||
{ | ||
"name": "Launch Built-in web server", | ||
"type": "php", | ||
"request": "launch", | ||
"runtimeArgs": [ | ||
"-dxdebug.mode=debug", | ||
"-dxdebug.start_with_request=yes", | ||
"-S", | ||
"localhost:0" | ||
], | ||
"program": "", | ||
"cwd": "${workspaceRoot}", | ||
"port": 9001, | ||
"serverReadyAction": { | ||
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started", | ||
"uriFormat": "http://localhost:%s", | ||
"action": "openExternally" | ||
} | ||
} | ||
] | ||
} |
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,59 @@ | ||
{ | ||
"editor.detectIndentation": true, | ||
"editor.renderWhitespace": "all", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": false, | ||
"blockman.n01LineHeight": 23, | ||
"blockman.n02EachCharFrameWidth": 9.321, | ||
"blockman.n23AnalyzeSquareBrackets": true, | ||
"phpsab.fixerEnable": true, | ||
"phpsab.snifferEnable": true, | ||
"phpsab.snifferMode": "onSave", | ||
"phpsab.snifferTypeDelay": 250, | ||
"phpsab.snifferShowSources": true, | ||
"phpsab.executablePathCS": "/usr/local/bin/phpcs", | ||
"phpsab.executablePathCBF": "/usr/local/bin/phpcbf", | ||
"phpsab.standard": "WordPressOrg,WordPress-ExtraOrg,WordPress-DocsOrg", | ||
/* WordPress-Extra,WordPress,,WordPress-Docs */ | ||
"phpsab.debug": false, | ||
"phpsab.allowedAutoRulesets": [ | ||
".phpcs.xml", | ||
".phpcs.xml.dist", | ||
"phpcs.xml", | ||
"phpcs.xml.dist", | ||
"phpcs.ruleset.xml", | ||
"ruleset.xml" | ||
], | ||
"phpmd.rules": "codesize,design,unusedcode,naming", | ||
"namespaceResolver.autoImportOnSave": true, | ||
"phpResolver.phpLogFile": "/var/www/html-multi/wp-content/debug.log", | ||
"phpResolver.phpLogFilePathRemote": "", | ||
"phpResolver.phpLogFilePathLocal": "", | ||
"phpResolver.phpBeautifierCommand": "/usr/bin/phpcbf", | ||
"phpResolver.phpSnifferCommand": "/usr/bin/phpcs", | ||
"phpResolver.phpStandards": "WordPress,WordPress-Extra,WordPress-Docs", | ||
"php-docblocker.returnGap": true, | ||
"php-docblocker.qualifyClassNames": true, | ||
"php-docblocker.extra": [ | ||
"", | ||
"@since latest" | ||
], | ||
"workbench.colorCustomizations": { | ||
"editor.lineHighlightBackground": "#1073cf2d", | ||
"editor.lineHighlightBorder": "#9fced11f" | ||
}, | ||
"editor.wordWrap": "on", | ||
"editor.guides.indentation": true, | ||
"editor.inlayHints.enabled": "on", | ||
"editor.guides.bracketPairs": true, | ||
"editor.guides.bracketPairsHorizontal": true, | ||
"intelephense.completion.fullyQualifyGlobalConstantsAndFunctions": true, | ||
"php.suggest.basic": false, | ||
"php.validate.enable": false, | ||
"[php]": { | ||
"editor.defaultFormatter": "StoilDobreff.php-resolver" | ||
}, | ||
"cSpell.words": [ | ||
"phpcs" | ||
], | ||
} |
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,40 @@ | ||
image: | ||
file: .gitpod/.gitpod.dockerfile | ||
|
||
ports: | ||
- port: 8080 | ||
onOpen: open-preview | ||
- port: 3306 | ||
onOpen: ignore | ||
- port: 8025 | ||
onOpen: ignore | ||
- port: 1025 | ||
onOpen: ignore | ||
- port: 9000 | ||
onOpen: ignore | ||
|
||
tasks: | ||
- name: Some init | ||
command: | | ||
sudo service mysql start | ||
sudo service php8.3-fpm start | ||
sudo service nginx start | ||
sudo mailhog </dev/null &>/dev/null & disown | ||
/bin/bash .gitpod/.init.sh | ||
vscode: | ||
extensions: | ||
- eamodio.gitlens | ||
- felixfbecker.php-debug | ||
- sleistner.vscode-fileutils | ||
- streetsidesoftware.code-spell-checker | ||
- mrmlnc.vscode-duplicate | ||
- usernamehw.errorlens | ||
- RobertOstermann.inline-parameters-extended | ||
- zaaack.markdown-editor | ||
- neilbrayfield.php-docblocker | ||
- felixfbecker.php-pack | ||
- bmewburn.vscode-intelephense-client | ||
- StoilDobreff.php-resolver | ||
- ms-vscode.sublime-keybindings | ||
- sdras.night-owl |
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,5 @@ | ||
# Gitpod docker image for WordPress | https://github.com/sdobreff/docker-bb-ci | ||
# License: MIT (c) 2023 | ||
# Version: 1.0 | ||
|
||
FROM sdobreff/gitpod:latest |
Oops, something went wrong.