-
Notifications
You must be signed in to change notification settings - Fork 60
62 lines (47 loc) · 1.67 KB
/
wp-tests-phpunit.yml
File metadata and controls
62 lines (47 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: WordPress PHPUnit Tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: WordPress PHPUnit Tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set UID and GID for PHP in WordPress images
run: |
echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
- name: Run WordPress PHPUnit tests
run: node .github/workflows/wp-tests-phpunit-run.js
- name: Stop Docker containers
if: always()
run: composer run wp-test-clean
native-parser-test:
name: WordPress PHPUnit Tests / Rust extension
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set UID and GID for PHP in WordPress images
run: |
echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
- name: Set up WordPress test environment
run: composer run wp-setup
- name: Build and load parser extension in WordPress PHP containers
run: bash .github/workflows/wp-tests-phpunit-native-extension-setup.sh
- name: Verify WordPress uses parser extension
run: cd wordpress && node tools/local-env/scripts/docker.js run --rm php php /var/www/native-verify-extension.php
- name: Stop Docker containers
if: always()
run: composer run wp-test-clean