-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into bugfix/pro/464
- Loading branch information
Showing
58 changed files
with
64,958 additions
and
98,475 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 |
---|---|---|
@@ -1,24 +1,26 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true | ||
}, | ||
extends: 'plugin:vue/recommended', | ||
// required to lint *.vue files | ||
plugins: [ | ||
'html', | ||
'vue', | ||
], | ||
// add your custom rules here | ||
rules: { | ||
"indent": ["error", "tab"], | ||
"no-tabs": 0, | ||
"space-in-parens": ["error", "always"], | ||
"camelcase": [2,{"properties":"never"}], | ||
}, | ||
"parserOptions":{ | ||
"parser": "babel-eslint" | ||
}, | ||
globals: {} | ||
} | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
}, | ||
extends: ['plugin:vue/recommended'], | ||
// required to lint *.vue files | ||
plugins: ['vue'], | ||
// add your custom rules here | ||
rules: { | ||
'vue/no-dupe-keys': 'warn', | ||
'vue/no-unused-components': 'warn', | ||
'vue/no-side-effects-in-computed-properties': 'warn', | ||
'vue/return-in-computed-property': 'warn', | ||
'vue/no-unused-vars': 'warn', | ||
'vue/no-textarea-mustache': 'warn', | ||
'vue/require-valid-default-prop': 'warn', | ||
'vue/multi-word-component-names': 'warn', | ||
'vue/no-mutating-props': 'warn', | ||
}, | ||
parserOptions: { | ||
parser: 'babel-eslint', | ||
}, | ||
globals: {}, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: E2E | ||
|
||
on: | ||
pull_request: | ||
types: [synchronize, ready_for_review] | ||
branches-ignore: | ||
- "update_dependencies" | ||
|
||
jobs: | ||
e2e: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name | ||
|
||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "7.4" | ||
|
||
# run composer install | ||
- name: Install composer | ||
run: composer install --prefer-dist --no-progress --quiet | ||
|
||
# setup the node cache (node_modules) with github actions cache | ||
- name: Cache Node - npm | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node-cache- | ||
- name: npm ci | ||
run: | | ||
npm ci | ||
- name: Make build | ||
run: | | ||
npm run build | ||
- name: Setup WP Env | ||
run: | | ||
npm run wp-env start | ||
- name: Install Playwright | ||
run: | | ||
npm install -g playwright-cli | ||
npx playwright install | ||
- name: Playwright Blocks | ||
run: | | ||
npm run test:e2e:playwright | ||
continue-on-error: true | ||
|
||
- name: Upload tests artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifact | ||
path: ./artifacts | ||
retention-days: 1 |
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,28 @@ | ||
name: Test JS | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, ready_for_review] | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
name: JS Lint | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
persist-credentials: false | ||
- name: Build files using ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Lint js files | ||
run: | | ||
npm ci | ||
npm run lint | ||
env: | ||
CI: 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 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,8 @@ | ||
{ | ||
"core": "WordPress/WordPress", | ||
"plugins": [ "." ], | ||
"env": { | ||
"tests": { | ||
} | ||
} | ||
} |
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,25 @@ | ||
# How to contribute to the project. | ||
|
||
## Development Setup | ||
|
||
This projects requires you to have Node.js (with npm) and Composer. | ||
|
||
- You can run `npm ci` & `composer install` to install dependencies. | ||
- Once done, you can run `npm run build` to generate build files. | ||
- You can also use `npm run dev` to generate dev build if you are working on the files. | ||
|
||
> [!NOTE] | ||
> The minimum Node version is 16. The version recommended is 18 or higher (tested up to 21). For PHP, use 7.4. | ||
## E2E Testing | ||
|
||
We use Playwright to write the E2E together with WordPress tool set. | ||
|
||
Use `npm run wp-env start` to start the testing environment. | ||
|
||
> [!NOTE] | ||
> The testing instance has a port that need to be free to work with setup (usually the port 8889). | ||
Install Playwright with `npm install -g playwright-cli` and `npx playwright install`. | ||
|
||
Use `npm run test:e2e:playwright:ui` to lunch it in UI mode for easy development. |
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
Oops, something went wrong.