Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
.gitattributes export-ignore
.wordpress-org export-ignore
.editorconfig export-ignore
phpcs.xml export-ignore
composer.json export-ignore
docker-compose.yml export-ignore
phpcs.xml export-ignore
31 changes: 31 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PHP_CodeSniffer
on:
push:
pull_request:
jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
tools: composer, cs2pr
- name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Setup cache
uses: pat-s/[email protected]
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use the hash of composer.json as the key for your cache if you do not commit composer.lock.
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
#key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Detect coding standard violations
run: ./vendor/bin/phpcs
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

/vendor/
.DS_Store
.vscode/settings.json
.vscode
composer.lock
28 changes: 28 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "pfefferle/wordpress-opengraph",
"description": "Adds Open Graph metadata to your posts and pages so that they look great when shared on sites like Facebook and Twitter.",
"type": "wordpress-plugin",
"license": "Apache License, Version 2.0",
"require": {
"php": ">=7.0",
"composer/installers": "^1.0 || ^2.0"
},
"require-dev": {
"phpcompatibility/php-compatibility": "*",
"phpcompatibility/phpcompatibility-wp": "*",
"squizlabs/php_codesniffer": "3.*",
"wp-coding-standards/wpcs": "dev-develop",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
"sirbrillig/phpcs-variable-analysis": "^2.11",
"phpcsstandards/phpcsextra": "^1.1.0"
},
"config": {
"allow-plugins": true
},
"allow-plugins": {
"composer/installers": true
},
"extra": {
"installer-name": "opengraph"
}
}
Loading
Loading