Skip to content

Commit

Permalink
Merge branch 'main' into PRESS4-498
Browse files Browse the repository at this point in the history
* main:
  commit workflow contents
  add brand plugin test workflow
  more lint fixes
  some lint fixes
  `use function WP_Forge\Helpers\dataGet;` Fix #61
  Require `wp-forge/helpers`
  fixing linting issues
  passing only the array keys instead of entire values
  Fixed the deprecated warning from wp-module-data module
  delete useless autogen comment
  Linting/spacing
  Add `server_path` to `get_core_data()` using `ABSPATH`
  Add WP_Mock for tests
  • Loading branch information
circlecube committed Mar 13, 2024
2 parents a146f7a + 50c36f5 commit 31ec621
Show file tree
Hide file tree
Showing 10 changed files with 2,905 additions and 448 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/brand-plugin-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build and Test Updates in Plugins
on:
pull_request:
types: [ opened, reopened, ready_for_review, synchronize ]
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.extract_branch.outputs.branch }}
steps:

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

bluehost:
name: Bluehost Build and Test
needs: setup
uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main
with:
module-repo: ${{ github.repository }}
module-branch: ${{ needs.setup.outputs.branch }}
plugin-repo: 'bluehost/bluehost-wordpress-plugin'
secrets: inherit

hostgator:
name: HostGator Build and Test
needs: setup
uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main
with:
module-repo: ${{ github.repository }}
module-branch: ${{ needs.setup.outputs.branch }}
plugin-repo: 'newfold-labs/wp-plugin-hostgator'
node-version: 20
secrets: inherit

web:
name: Web.com Build and Test
needs: setup
uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main
with:
module-repo: ${{ github.repository }}
module-branch: ${{ needs.setup.outputs.branch }}
plugin-repo: 'newfold-labs/wp-plugin-web'
node-version: 20
secrets: inherit

crazydomains:
name: Crazy Domains Build and Test
needs: setup
uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main
with:
module-repo: ${{ github.repository }}
module-branch: ${{ needs.setup.outputs.branch }}
plugin-repo: 'newfold-labs/wp-plugin-crazy-domains'
node-version: 20
secrets: inherit

mojo:
name: Mojo Build and Test
needs: setup
uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main
with:
module-repo: ${{ github.repository }}
module-branch: ${{ needs.setup.outputs.branch }}
plugin-repo: 'newfold-labs/wp-plugin-mojo'
node-version: 20
secrets: inherit
10 changes: 9 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"bootstrap.php"
]
},
"autoload-dev": {
"psr-4": {
"NewfoldLabs\\WP\\Module\\Data\\": "tests/phpunit/includes/"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
Expand All @@ -44,11 +49,14 @@
"lint": "Check files against coding standards."
},
"require": {
"wp-forge/wp-upgrade-handler": "^1.0",
"newfold-labs/wp-module-loader": "^1.0",
"wp-forge/helpers": "^2.0",
"wp-forge/wp-query-builder": "^1.0",
"wp-forge/wp-upgrade-handler": "^1.0",
"wpscholar/url": "^1.2"
},
"require-dev": {
"10up/wp_mock": "^0.4.2",
"newfold-labs/wp-php-standards": "^1.2"
}
}
Loading

0 comments on commit 31ec621

Please sign in to comment.