-
Notifications
You must be signed in to change notification settings - Fork 19
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
50 changed files
with
4,152 additions
and
4,332 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 |
---|---|---|
|
@@ -27,4 +27,4 @@ phpunit.xml | |
README.md | ||
webpack.config.js | ||
webpack.gutenberg.config.js | ||
wpacceptance.json | ||
.wp-env.json |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ assets | |
dist | ||
node_modules | ||
vendor | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: E2E Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- trunk | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
cypress: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
core: | ||
- { name: 'WP latest', version: 'latest' } | ||
- { name: 'WP trunk', version: 'WordPress/WordPress#master' } | ||
- { name: 'WP minimum', version: 'WordPress/WordPress#5.2' } | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: npm i && npm i -g [email protected] | ||
|
||
- name: Build asset | ||
run: npm run build | ||
|
||
- name: Add dependencies | ||
run: composer install -o --no-dev --ignore-platform-reqs | ||
|
||
- name: Set the core version | ||
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }} | ||
|
||
- name: Set up WP environment | ||
run: npm run env:start | ||
|
||
- name: Test | ||
run: cypress run --config-file tests/cypress/config.json --env TWITTER_API_KEY=${{ secrets.TWITTER_API_KEY }},TWITTER_API_SECRET=${{ secrets.TWITTER_API_SECRET }},TWITTER_ACCESS_TOKEN=${{ secrets.TWITTER_ACCESS_TOKEN }},TWITTER_ACCESS_SECRET=${{ secrets.TWITTER_ACCESS_SECRET }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: cypress-artifact-autoshare-for-twitter | ||
retention-days: 2 | ||
path: | | ||
${{ github.workspace }}/tests/cypress/screenshots/ | ||
${{ github.workspace }}/tests/cypress/videos/ | ||
${{ github.workspace }}/tests/cypress/logs/ |
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,24 @@ | ||
name: ESLint | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- trunk | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
eslint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install node v12 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: npm install | ||
run: npm install | ||
- name: Run eslint | ||
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,35 @@ | ||
name: PHP Compatibility | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- trunk | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
php_compatibility: | ||
name: PHP minimum 7.2 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set PHP version | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.2 | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Remove non-production dependencies | ||
run: rm composer.lock && composer remove --dev phpunit/phpunit yoast/phpunit-polyfills | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Run PHP Compatibility | ||
run: vendor/bin/phpcs autoshare-for-twitter.php includes/ --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.2- |
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,31 @@ | ||
name: PHPCS | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- trunk | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
phpcs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set PHP version | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.3' | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Run PHPCS | ||
run: vendor/bin/phpcs autoshare-for-twitter.php includes/ --extensions=php -s |
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: PHPUnit | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- trunk | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
phpunit: | ||
runs-on: ubuntu-latest | ||
services: | ||
mysql: | ||
image: mariadb:10.4 | ||
env: | ||
MYSQL_ROOT_PASSWORD: root | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: ['7.3', '8.0'] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set PHP version | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none | ||
extensions: mysql, imagick | ||
|
||
- name: Run PHPUnit | ||
run: ./bin/test.sh |
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
{ | ||
"plugins": [ | ||
"https://downloads.wordpress.org/plugin/classic-editor.1.6.1.zip", | ||
"." | ||
], | ||
"env": { | ||
"tests": { | ||
"mappings": { | ||
"wp-cli.yml": "./tests/bin/wp-cli.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
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
Oops, something went wrong.