-
Notifications
You must be signed in to change notification settings - Fork 8
43 lines (33 loc) · 912 Bytes
/
test.yml
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
name: Test
# This workflow is triggered on pushes to trunk, and any PRs.
on:
push:
branches: [trunk]
pull_request:
jobs:
lint:
name: Test
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install NodeJS
uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Setup PHP and Composer
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer:v2
- name: Install NPM dependencies
run: yarn
- name: Start the Docker testing environment
run: yarn wp-env start --xdebug=coverage
- name: Setup environment tools
run: yarn setup:tools
- name: Test PHP
run: yarn test
- name: Test JS
run: yarn test:js