Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue-1144: Adopt Updated Alley GitHub Actions Structure #1145

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
50 changes: 50 additions & 0 deletions .github/workflows/all-pr-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "All Pull Request Tests"

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

jobs:
general-and-node-tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4

- name: Run General Tests
uses: alleyinteractive/action-test-general@develop

- name: Run Node Tests
uses: alleyinteractive/action-test-node@develop
with:
node-version: '20'
skip-audit: 'true'

php-tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
php-version: ['8.2']
concurrency:
group: php-${{ matrix.php-version }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4

- name: Run PHP Tests
uses: alleyinteractive/action-test-php@fix/wp-env-vars
with:
php-version: ${{ matrix.php-version }}
wordpress-host: 'false'
wordpress-version: 'false'
4 changes: 1 addition & 3 deletions .github/workflows/built-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@ jobs:
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
with:
composer_install: false
node: 20
php: '8.2'
composer_install: true
draft: false
22 changes: 0 additions & 22 deletions .github/workflows/node-tests.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/phpcs.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/phpunit.yml

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"lint": "npx check-node-version --package && eslint --ext .jsx --ext .js .",
"lint:fix": "npx check-node-version --package && eslint --ext .jsx --ext .js . --fix",
"scaffold": "scaffold dir ./scaffold --theme=./",
"test": "npx check-node-version --package && jest",
"test:watch": "npx check-node-version --package && jest --watch",
"jest": "npx check-node-version --package && jest",
"jest:watch": "npx check-node-version --package && jest --watch",
"test": "npm run lint && npm run jest",
"prerelease": "check-node-version --package",
"release": "npx @alleyinteractive/create-release@latest"
},
Expand Down
2 changes: 2 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/* phpcs:disable WordPressVIPMinimum.Files.IncludingFile.UsingVariable */

const MANTLE_TESTING_DEBUG = true; // phpcs:ignore

/**
* Includes a PHP file if it exists.
*
Expand Down
Loading