diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf456aef..853e0687 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,25 +1,44 @@ -name: Test +name: Lint and test on: [push] jobs: - php: - name: PHP test + tests: runs-on: ubuntu-latest + strategy: + matrix: + php: ['7.2', '7.3', '7.4'] + name: PHP ${{ matrix.php }} tests steps: - uses: actions/checkout@v1 - name: Install PHP uses: shivammathur/setup-php@1.3.7 with: - php-version: 7.4 + php-version: ${{ matrix.php }} - name: Debugging run: | php --version php -m composer --version - name: Install dependencies - run: | - composer install --prefer-dist --no-suggest + run: composer install --prefer-dist --no-suggest --no-progress - name: Run tests + run: composer run test + lint: + runs-on: ubuntu-latest + name: Lint project files + steps: + - uses: actions/checkout@v1 + - name: Install PHP + uses: shivammathur/setup-php@1.3.7 + with: + php-version: '7.4' + - name: Debugging run: | - composer run test \ No newline at end of file + php --version + php -m + composer --version + - name: Install dependencies + run: composer install --prefer-dist --no-suggest --no-progress + - name: Run validate + run: composer run lint \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 569c4ee1..00000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: php - -php: - - 7.2 - - 7.3 - - 7.4 - -install: - - composer selfupdate --no-interaction - - composer install --no-interaction - -script: phpunit --configuration phpunit.xml --coverage-text diff --git a/composer.json b/composer.json index 503b263d..a925709f 100644 --- a/composer.json +++ b/composer.json @@ -27,9 +27,11 @@ "squizlabs/php_codesniffer": "^3.5" }, "scripts": { - "test": [ + "lint": [ "composer validate", - "phpcs", + "phpcs" + ], + "test": [ "phpunit" ] }