-
Notifications
You must be signed in to change notification settings - Fork 13
53 lines (44 loc) · 1.12 KB
/
tests.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
44
45
46
47
48
49
50
51
52
53
name: Tests
on:
push:
branches:
- main
paths:
- "**.php"
- "**.tsx"
- "**.ts"
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
tools: composer, cs2pr, phpcs
- name: Build
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: |
yarn install
composer prefix-dependencies
composer install
- name: Start WordPress Environment
run: npm run wp-env start --xdebug=coverage
- name: Check WooCommerce Activation
run: npm run wp-env run cli -- wp plugin list
- name: Linting the code
run: |
vendor/bin/phpcs -i
vendor/bin/phpcs --config-show
# vendor/bin/phpcs --report=checkstyle | cs2pr
npm run lint
continue-on-error: true
- name: Running the tests
run: |
npm run test
# cat phpunit.xml | cs2pr