Skip to content

Commit

Permalink
Migrate pull request tests into single workflow (#372)
Browse files Browse the repository at this point in the history
* Condense into a single workflow

* Scrub away buddy

* Upgrading ws module

* action wordpress version false

* Make it WP_VERSION

* Use the branch of the action

* Comment about why

* Add skip-wordpress-install

* Testing CI

* Testing CI

* Testing CI

* Remove node tests during configuration if needed

* Configure sqlite

* Adjust language some more

* Re-add draft check

* Re-add draft check

* Re-add draft check

* Include concurrency

* Fix matrix group

* Change source
  • Loading branch information
srtfisher authored Jul 23, 2024
1 parent 9aad1a1 commit f7229c3
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 276 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/all-pr-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "All Pull Request Tests"

on:
pull_request:
branches:
- develop
types: [opened, synchronize, reopened, ready_for_review]

jobs:
# We use a single job to ensure that all steps run in the same environment and
# reduce the number of minutes used.
pr-tests:
# Don't run on draft PRs
if: github.event.pull_request.draft == false
# Timeout after 10 minutes
timeout-minutes: 10
# Define a matrix of PHP/WordPress versions to test against
strategy:
matrix:
php: [8.1, 8.2, 8.3]
wordpress: ["latest"]
runs-on: ubuntu-latest
# Cancel any existing runs of this workflow
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}-P${{ matrix.php }}-WP${{ matrix.wordpress }}
cancel-in-progress: true
# Name the job in the matrix
name: "PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }}"
steps:
- uses: actions/checkout@v4

- name: Run General Tests
# See https://github.com/alleyinteractive/action-test-general for more options
uses: alleyinteractive/action-test-general@develop

- name: Run Node Tests
# See https://github.com/alleyinteractive/action-test-node for more options.
# Defaults to the latest LTS version.
uses: alleyinteractive/action-test-node@develop

- name: Run PHP Tests
# See https://github.com/alleyinteractive/action-test-php for more options
uses: alleyinteractive/action-test-php@develop
with:
php-version: '${{ matrix.php }}'
wordpress-version: '${{ matrix.wordpress }}'
skip-wordpress-install: 'true'
16 changes: 0 additions & 16 deletions .github/workflows/coding-quality.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/coding-standards.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/node-tests.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/unit-test.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<exclude-pattern>build/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>

<!-- The version set here matches the minimum version tested in buddy.yml. -->
<config name="minimum_supported_wp_version" value="5.9" />
<!-- The version set here matches the minimum version tested in tests. -->
<config name="minimum_supported_wp_version" value="6.5" />

<!-- Define the prefixes that can be used by the plugin -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
Expand Down
174 changes: 0 additions & 174 deletions buddy.yml

This file was deleted.

Loading

0 comments on commit f7229c3

Please sign in to comment.