diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..96fee09 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +# Configure Dependabot scanning. +version: 2 + +updates: + # Check for updates to GitHub Actions. + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + open-pull-requests-limit: 10 + groups: + github-actions: + patterns: + - "*" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9424557 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,43 @@ +name: "PHP Tests" + +on: + push: + branches: + - "master" + pull_request: null + +permissions: + contents: "read" + +jobs: + test: + runs-on: "ubuntu-latest" + + strategy: + matrix: + php-version: + - "7.3" + - "7.4" + - "8.0" + - "8.1" + - "8.2" + - "8.3" + - "8.4" + + 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: "Vadliate composer" + run: "composer validate --strict" + + - name: "Install dependencies" + run: "composer update --no-interaction" + + - run: "composer run test" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ed73251..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -# TravisCI configuration for php-stubs/generator - -language: "php" -os: - - "linux" -dist: "bionic" - -php: - - "7.3" - - "7.4" - - "8.0" - -cache: - directories: - - "${HOME}/.composer/cache" - -before_install: - - "composer validate --strict" - -install: - - "composer update" - -script: - - "vendor/bin/phpunit --verbose" diff --git a/README.md b/README.md index 13eea8a..c155dbc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PHP Stubs Generator -[![Build Status](https://travis-ci.com/php-stubs/generator.svg?branch=master)](https://travis-ci.com/github/php-stubs/generator) +[![Build Status](https://github.com/php-stubs/generator/actions/workflows/test.yml/badge.svg)](https://github.com/php-stubs/generator/actions/workflows/test.yml) Use this tool to generate stub declarations for functions, classes, interfaces, and global variables defined in any PHP code. The stubs can subsequently be used to facilitate IDE completion or static analysis via [PHPStan](https://phpstan.org) or potentially other tools. Stub generation is particularly useful for code which mixes definitions with side-effects. diff --git a/composer.json b/composer.json index 98f674d..385d37b 100644 --- a/composer.json +++ b/composer.json @@ -33,5 +33,8 @@ "vimeo/psalm": "^4.1", "phpunit/phpunit": "^9.4", "friendsofphp/php-cs-fixer": "^2.16 || ^3.12" + }, + "scripts": { + "test": "phpunit --verbose" } }