Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
tests:
name: Tests
runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- "7.4"
- "8.0"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
ini-file: development
php-version: "${{ matrix.php-version }}"

- name: Install dependencies
run: composer install --no-interaction --no-progress --prefer-dist

- name: Tests
run: |
./generate.sh # Generate stubs
php -l wordpress-stubs.php # Check stubs syntax
git diff --exit-code # Check stubs changes compared to repository
php -f wordpress-stubs.php # Execute stubs
composer run test # Run all tests