-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (37 loc) · 1.13 KB
/
tests.yml
File metadata and controls
48 lines (37 loc) · 1.13 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
name: Tests
on:
pull_request:
types: [ opened, synchronize ]
jobs:
phpunit:
name: PHPUnit ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.4', '8.5' ]
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: 'none'
tools: composer
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--no-progress --no-ansi --no-interaction"
- name: Install wp-env
run: npm -g install @wordpress/env --force
- name: Override PHP version
run: echo '{ "phpVersion":"${{ matrix.php }}" }' > .wp-env.override.json
- name: Start wp-env
run: wp-env start
- name: Run tests
run: wp-env run tests-cli --env-cwd=wp-content/plugins/wporg-gp-translation-events ./vendor/bin/phpunit