Skip to content

Commit b7d9d8b

Browse files
committed
Add Copilot PHPUnit setup workflow
1 parent 1578bc3 commit b7d9d8b

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Copilot Setup Steps
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/copilot-setup-steps.yml
8+
pull_request:
9+
paths:
10+
- .github/workflows/copilot-setup-steps.yml
11+
12+
jobs:
13+
copilot-setup-steps:
14+
runs-on: ubuntu-22.04
15+
timeout-minutes: 30
16+
permissions:
17+
contents: read
18+
services:
19+
database:
20+
image: mysql:latest
21+
env:
22+
MYSQL_DATABASE: wordpress_tests
23+
MYSQL_ROOT_PASSWORD: root
24+
ports:
25+
- 3306:3306
26+
options: >-
27+
--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -proot"
28+
--health-interval=10s
29+
--health-timeout=5s
30+
--health-retries=10
31+
steps:
32+
- name: Checkout source code
33+
uses: actions/checkout@v4
34+
35+
- name: Setup PHP version
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: '8.0'
39+
extensions: simplexml, mysql
40+
tools: phpunit-polyfills:1.1
41+
coverage: none
42+
43+
- name: Install WordPress test suite prerequisites
44+
run: sudo apt-get update && sudo apt-get install -y subversion default-mysql-client
45+
46+
- name: Install WordPress Test Suite
47+
run: composer install-wp-tests
48+
49+
- name: Install Composer dependencies
50+
run: composer install --prefer-dist --no-progress --no-suggest
51+
52+
- name: Verify PHPUnit is available
53+
run: composer phpunit -- --version

0 commit comments

Comments
 (0)