diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..1a91078 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,38 @@ +name: PHP Linting + +on: [push] + +jobs: + lint: + + runs-on: ubuntu-latest + strategy: + matrix: + php: [7.3, 7.4] + steps: + - uses: actions/checkout@v2 + + - name: PHP Version + run: php --version + + - name: Lint PHP Files + run: find . -name "*.php" -print0 | xargs -0 -n1 php -l + + - name: Lint PHP Files ( 8 threads ) + run: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l + +# - name: Cache composer dependencies +# uses: actions/cache@v1 +# with: +# path: vendor +# key: composer-${{ hashFiles('composer.lock') }} + + + - name: Validate composer.json and composer.lock + run: ls composer.json > /dev/null && composer validate + + - name: Composer Install + run: ls composer.json > /dev/null && composer install + + - name: Run PHPUnit tests + run: ls vendor/bin/phpunit > /dev/null && ./vendor/bin/phpunit diff --git a/composer.json b/composer.json index f43495d..f7ccdd6 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,6 @@ "description": "Takes stock of a local install and generates a composer.json", "license": "GPL-2.0+", "type": "wordpress-plugin", - "version": "dev-master", "authors": [ { "name": "Tom J Nowell",