-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from tarosky/feature/wp-env
Default Changelist
- Loading branch information
Showing
555 changed files
with
921 additions
and
7,942 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,23 @@ | ||
.browserslistrc | ||
.editorconfig | ||
.eslintrc | ||
.distignore | ||
.git | ||
.github | ||
.gitignore | ||
.node-version | ||
.stylelintrc.json | ||
.wordpress_org | ||
.wp-env.json | ||
node_modules | ||
composer.lock | ||
package-lock.json | ||
phpcs.ruleset.xml | ||
phpunit.xml.dist | ||
README.md | ||
webpack.config.js | ||
wordpress | ||
bin | ||
tests | ||
render-faster.php.bak | ||
readme.txt.bak |
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,25 @@ | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
# WordPress Coding Standards | ||
# https://make.wordpress.org/core/handbook/coding-standards/ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = tab | ||
tab_width = 4 | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[{*.txt,wp-config-sample.php}] | ||
end_of_line = crlf |
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,41 @@ | ||
{ | ||
"parser": "@babel/eslint-parser", | ||
"env": { | ||
"browser": true, | ||
"jquery": true | ||
}, | ||
"globals": { | ||
"wp": false, | ||
"jQuery": false, | ||
"angular": false, | ||
"Hametuha": true, | ||
"wpApiSettings": false, | ||
"ga": false, | ||
"Hashboard": true, | ||
"Vue": false | ||
}, | ||
"extends": [ | ||
"plugin:@wordpress/eslint-plugin/recommended-with-formatting" | ||
], | ||
"rules": { | ||
"no-alert": "off", | ||
"prettier/prettier": "off", | ||
"object-shorthand": "off", | ||
"jsdoc/require-jsdoc": "off", | ||
"jsdoc/no-undefined-types": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"react/jsx-sort-props": "off", | ||
"jsdoc/check-tag-names": "off", | ||
"import/order": "off", | ||
"no-prototype-builtins": "off", | ||
"object-curly-newline": "off", | ||
"object-property-newline": "off", | ||
"yoda": "off", | ||
"strict": "off" | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "16.9.0" | ||
} | ||
} | ||
} |
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,164 @@ | ||
name: Deploy Plugin | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: [ '7.4', '8.0' ] # PHP versions to check. | ||
wp: [ 'latest', '5.9' ] # WordPress version to check. | ||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
options: --health-cmd "mysqladmin ping --host 127.0.0.1 --port 3306" --health-interval 20s --health-timeout 10s --health-retries 10 | ||
ports: | ||
- 3306/tcp | ||
env: | ||
MYSQL_ROOT_PASSWORD: root | ||
name: WordPress ${{ matrix.wp }} in PHP ${{ matrix.php }} UnitTest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist | ||
|
||
- name: Start MySQL | ||
run: sudo systemctl start mysql | ||
|
||
- name: Install WordPress | ||
run: bash bin/install-wp-tests.sh wordpress root root 127.0.0.1:3306 ${{ matrix.wp }} | ||
|
||
- name: Check PHP Unit | ||
run: composer test | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
name: WordPress Syntax Check | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
tools: composer | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist | ||
|
||
- name: Check PHP syntax | ||
run: composer lint | ||
|
||
assets: | ||
name: Check Assets | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install NPM Packages | ||
run: npm install | ||
|
||
- name: Check JS & CSS syntax | ||
run: npm run lint | ||
|
||
pre_release: | ||
name: Create Release | ||
needs: [ test, assets ] | ||
if: contains(github.ref, 'tags/') | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.export.outputs.upload_url }} | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release Render Faster ${{ github.ref }} | ||
body: | | ||
Release Render FAster version ${{ github.ref }}. | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Export Upload URL | ||
id: export | ||
run: echo "::set-output name=upload_url::${{ steps.create_release.outputs.upload_url }}" | ||
|
||
release: | ||
name: Deploy GitHub Release | ||
needs: pre_release | ||
if: contains(github.ref, 'tags/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Confirm | ||
run: echo ${{ needs.pre_release.outputs.upload_url }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
tools: composer | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install NPM | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Build package. | ||
run: bash bin/build.sh ${{ github.ref }} | ||
|
||
- name: Cleanup package. | ||
run: bash bin/clean.sh | ||
|
||
- name: Create Zip | ||
run: zip -r tscf.zip ./ | ||
|
||
- name: Upload Release Zip | ||
id: upload-release-asset | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.pre_release.outputs.upload_url }} | ||
asset_path: ./tscf.zip | ||
asset_name: tscf.zip | ||
asset_content_type: application/zip |
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,16 @@ | ||
{ | ||
"extends": [ | ||
"stylelint-config-wordpress/scss" | ||
], | ||
"rules": { | ||
"value-keyword-case": [ "lower", { | ||
"ignoreProperties": [ "font-family" ] | ||
} ], | ||
"number-leading-zero": null, | ||
"rule-empty-line-before": null, | ||
"declaration-property-unit-whitelist": null, | ||
"selector-class-pattern": null, | ||
"at-rule-empty-line-before": null, | ||
"no-descending-specificity": null | ||
} | ||
} |
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,12 @@ | ||
{ | ||
"core": null, | ||
"plugins": [ "." ], | ||
"themes": [ | ||
"https://downloads.wordpress.org/theme/twentytwenty.latest-stable.zip" | ||
], | ||
"config": { | ||
"WP_DEBUG": true, | ||
"SCRIPT_DEBUG": true, | ||
"WP_DEBUG_LOG": 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.