Skip to content

Commit 1d7b809

Browse files
committed
Set up GitHub Actions
1 parent b7ad4ac commit 1d7b809

File tree

2 files changed

+68
-2
lines changed

2 files changed

+68
-2
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: validate-on-push
2+
on: [push]
3+
jobs:
4+
linter:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- uses: php-actions/composer@v6
9+
with:
10+
php_version: '7.4'
11+
command: config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
12+
- uses: php-actions/composer@v6
13+
with:
14+
php_version: '7.4'
15+
# See https://github.com/WordPress/WordPress-Coding-Standards/issues/2068
16+
command: require --dev wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installer phpcompatibility/phpcompatibility-wp
17+
- run: ./vendor/bin/phpcs
18+
19+
unit-tests-php73:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: php-actions/composer@v6
24+
with:
25+
php_version: '7.3'
26+
- uses: php-actions/composer@v6
27+
with:
28+
php_version: '7.3'
29+
command: test
30+
31+
unit-tests-php74:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: php-actions/composer@v6
36+
with:
37+
php_version: '7.4'
38+
- uses: php-actions/composer@v6
39+
with:
40+
php_version: '7.4'
41+
command: test
42+
43+
unit-tests-php80:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v3
47+
- uses: php-actions/composer@v6
48+
with:
49+
php_version: '8.0'
50+
- uses: php-actions/composer@v6
51+
with:
52+
php_version: '8.0'
53+
command: test
54+
55+
unit-tests-php81:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v3
59+
- uses: php-actions/composer@v6
60+
with:
61+
php_version: '8.1'
62+
- uses: php-actions/composer@v6
63+
with:
64+
php_version: '8.1'
65+
command: test

phpunit.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
<!-- https://phpunit.readthedocs.io/en/9.5/configuration.html -->
33
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
5-
colors="true" cacheResult="false" convertErrorsToExceptions="true"
6-
convertNoticesToExceptions="true" convertWarningsToExceptions="true">
5+
colors="true" verbose="true" cacheResult="false"
6+
convertErrorsToExceptions="true" convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true">
78

89
<testsuites>
910
<testsuite name="tests">

0 commit comments

Comments
 (0)