diff --git a/.github/workflows/integrate.yml b/.github/workflows/integrate.yml new file mode 100644 index 0000000..95b76b6 --- /dev/null +++ b/.github/workflows/integrate.yml @@ -0,0 +1,41 @@ +name: "Integrate" + +on: + push: + branches: + - "master" + pull_request: + branches: + - "master" + +permissions: + contents: "read" + +jobs: + test: + runs-on: "ubuntu-latest" + + strategy: + matrix: + php-version: + - "7.4" + - "8.0" + + steps: + - name: "Checkout repository" + uses: "actions/checkout@v4" + + - name: "Set up PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: "none" + php-version: "${{ matrix.php-version }}" + + - name: "Install dependencies" + run: "composer install --no-interaction --no-progress --prefer-dist" + + - run: "./generate.sh" + - run: "php -l wordpress-stubs.php" + - run: "git diff --exit-code" + - run: "php -f wordpress-stubs.php" + - run: "composer run test" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 9cad8b7..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,44 +0,0 @@ -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 -