Skip to content

Commit 6fa5b9b

Browse files
authored
Configure GitHub Actions (#158)
1 parent 6105bda commit 6fa5b9b

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/tests.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
tests:
14+
name: Tests
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
php-version:
20+
- "7.4"
21+
- "8.0"
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Install PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
coverage: none
31+
ini-file: development
32+
php-version: "${{ matrix.php-version }}"
33+
34+
- name: Install dependencies
35+
run: composer install --no-interaction --no-progress --prefer-dist
36+
37+
- name: Tests
38+
run: |
39+
./generate.sh # Generate stubs
40+
php -l wordpress-stubs.php # Check stubs syntax
41+
git diff --exit-code # Check stubs changes compared to repository
42+
php -f wordpress-stubs.php # Execute stubs
43+
composer run test # Run all tests
44+

0 commit comments

Comments
 (0)