-
Notifications
You must be signed in to change notification settings - Fork 27
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
1 parent
10b4f4c
commit b74c1d9
Showing
108 changed files
with
25,823 additions
and
19 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 |
---|---|---|
|
@@ -14,23 +14,6 @@ jobs: | |
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: npm install, build dev version | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: clone extendify sdk | ||
env: | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
run: | | ||
git clone https://${{ secrets.ACCESS_TOKEN }}:[email protected]/gutenberghub/extendify-templates-library.git | ||
- name: rename sdk directory | ||
run: | | ||
mv extendify-templates-library extendify-templates-sdk | ||
- name: remove sdk plugin headers | ||
run: sed --in-place '2,9d' extendify-templates-sdk/extendify-sdk.php | ||
|
||
- name: WordPress Plugin Deploy | ||
uses: 10up/action-wordpress-plugin-deploy@stable | ||
|
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 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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 @@ | ||
node_modules/* | ||
vendor/* | ||
public/build/* |
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,82 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
jest: true, | ||
}, | ||
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended'], | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['react'], | ||
rules: { | ||
indent: ['error', 4, { | ||
SwitchCase: 1, | ||
}], | ||
quotes: ['error', 'single'], | ||
'comma-dangle': ['error', 'always-multiline'], | ||
'multiline-ternary': ['error', 'always'], | ||
'array-element-newline': ['error', 'consistent'], | ||
'no-constant-condition': ['error', { | ||
checkLoops: false, | ||
}], | ||
'space-before-function-paren': [ | ||
'error', | ||
{ | ||
anonymous: 'always', | ||
named: 'never', | ||
asyncArrow: 'always', | ||
}, | ||
], | ||
'react/react-in-jsx-scope': 'off', | ||
'function-paren-newline': [ | ||
'error', | ||
{ | ||
minItems: 3, | ||
}, | ||
], | ||
'quote-props': ['error', 'as-needed'], | ||
'object-curly-spacing': ['error', 'always'], | ||
'no-multiple-empty-lines': [ | ||
'error', | ||
{ | ||
max: 1, | ||
}, | ||
], | ||
'react/prop-types': 0, // TODO: Do we want this required? | ||
'lines-around-comment': [ | ||
'error', | ||
{ | ||
beforeBlockComment: true, | ||
allowBlockStart: true, | ||
}, | ||
], | ||
'object-curly-newline': [ | ||
'error', | ||
{ | ||
ObjectExpression: { | ||
minProperties: 1, | ||
}, | ||
ObjectPattern: { | ||
multiline: true, | ||
}, | ||
ImportDeclaration: { | ||
multiline: true, | ||
minProperties: 3, | ||
}, | ||
ExportDeclaration: { | ||
multiline: true, | ||
minProperties: 3, | ||
}, | ||
}, | ||
], | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
} |
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,39 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
Provide a screenshot of the browser console showing any errors, if applicable ([instructions](https://support.airtable.com/hc/en-us/articles/232313848-How-to-open-the-developer-console)). | ||
Also include any screenshots that demonstrate the issue more clearly. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,62 @@ | ||
name: Build and test | ||
on: [push, pull_request] | ||
jobs: | ||
# TODO: create another job for integration testing that includes Cypress, booting up WPO, etc | ||
# Reference wp-cli: https://github.com/wp-cli/wp-cli/blob/master/.github/workflows/testing.yml | ||
unit: #------------------------------------------- | ||
name: PHP ${{ matrix.php }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['7.4'] | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '${{ matrix.php }}' | ||
extensions: mysql, zip | ||
coverage: none | ||
tools: composer:v1, wp-cli, cs2pr, phpcs | ||
|
||
- name: Get Composer cache directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Use Composer cache | ||
uses: actions/cache@master | ||
with: | ||
path: ${{ steps['composer-cache'].outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress --no-suggest | ||
|
||
- name: Install PHPCS | ||
run: git clone -b master https://github.com/WordPress/WordPress-Coding-Standards.git ${{ github.workspace }}/wpcs | ||
|
||
- name: PHPCS check | ||
run: | | ||
phpcs --config-set installed_paths ${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,${{ github.workspace }}/vendor/phpcompatibility/php-compatibility/PHPCompatibility,${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieSodiumCompat,${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat,${{ github.workspace }}/wpcs | ||
phpcs -i | ||
phpcs -q --report=checkstyle . | cs2pr | ||
- name: Install NPM packages | ||
run: npm ci | ||
env: | ||
CYPRESS_INSTALL_BINARY: "0" | ||
|
||
- name: Build assets | ||
run: npm run build | ||
|
||
- name: Test JavaScript | ||
run: npm run test | ||
|
||
- name: Lint JavaScript | ||
run: npm run lint |
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,70 @@ | ||
name: Build development zip file | ||
on: push | ||
jobs: | ||
build: | ||
name: Build test, and zip | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [8.0] | ||
node-version: [14.x] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '${{ matrix.php }}' | ||
tools: composer:v1 | ||
|
||
- name: Get Composer cache directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Use Composer cache | ||
uses: actions/cache@master | ||
with: | ||
path: ${{ steps['composer-cache'].outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Build autoloader | ||
run: composer install --prefer-dist --no-progress --no-suggest --no-dev | ||
|
||
- name: Using Node version ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: npm install, build, and test | ||
run: | | ||
npm ci | ||
npm run dev | ||
touch .devbuild | ||
env: | ||
CI: true | ||
- name: Package | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: extendify-sdk | ||
retention-days: 5 | ||
path: | | ||
${{ github.workspace }}/ | ||
!${{ github.workspace }}/node_modules/ | ||
!${{ github.workspace }}/.github/ | ||
!${{ github.workspace }}/.git/ | ||
!${{ github.workspace }}/src/ | ||
!${{ github.workspace }}/.editorconfig | ||
!${{ github.workspace }}/.eslintrc.js | ||
!${{ github.workspace }}/.eslintignore | ||
!${{ github.workspace }}/.gitignore | ||
!${{ github.workspace }}/.svgrrc | ||
!${{ github.workspace }}/.prettierrc.js | ||
!${{ github.workspace }}/.phpcs.xml.dist | ||
!${{ github.workspace }}/webpack.config.js | ||
!${{ github.workspace }}/composer.json | ||
!${{ github.workspace }}/composer.lock | ||
!${{ github.workspace }}/package.json | ||
!${{ github.workspace }}/package-lock.json | ||
!${{ github.workspace }}/readme.md |
66 changes: 66 additions & 0 deletions
66
extendify-sdk/.github/workflows/force-production-on-main.yml
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,66 @@ | ||
name: Build production assets | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
name: Build and commit | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [8.0] | ||
node-version: [14.x] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set up git user | ||
run: git config --global user.name extendify | ||
- name: Set up git email | ||
run: git config --global user.name [email protected] | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '${{ matrix.php }}' | ||
extensions: mysql, zip | ||
coverage: none | ||
tools: composer:v1, wp-cli, cs2pr, phpcs | ||
|
||
- name: Get Composer cache directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Use Composer cache | ||
uses: actions/cache@master | ||
with: | ||
path: ${{ steps['composer-cache'].outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Build autoloader | ||
run: composer install --prefer-dist --no-progress --no-suggest --no-dev | ||
|
||
- name: Using Node version ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: npm install, build, and test | ||
run: | | ||
npm ci | ||
npm run build | ||
env: | ||
CI: true | ||
- name: Increment version number | ||
run: | | ||
perl -i -pe 's/(Stable tag: )([\d.]+)$/$1.($2+.1)/e' readme.txt | ||
- name: Commit dist folder if needed #it fails if nothing has changed so we allow an error | ||
run: git commit -am 'Build produciton assets' | ||
continue-on-error: true | ||
- name: Push changed files to main | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: main |
Oops, something went wrong.