diff --git a/.circleci/config.yml b/.circleci/config.yml index 4cb70b2..4ad0de5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,6 +13,7 @@ jobs: <<: *defaults steps: - checkout + - add_ssh_keys - run: name: Set up environment command: ./.circleci/set-up-globals.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b491d1..a9d747e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,3 +13,27 @@ jobs: uses: pantheon-systems/phpcompatibility-action@v1 with: test-versions: 7.4- + lint: + runs-on: ${{ matrix.operating-system }} + name: Lint checks - PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ 'macos-latest' ] + php-versions: [ '7.4', '8.0', '8.2', '8.4' ] + max-parallel: 3 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup PHP with PECL extension + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: gd, mbstring, zip, ssh2-1.3.1, pcov + coverage: pcov + ini-values: error_reporting=E_ALL + - name: Full Composer Install + run: composer install + - name: Lint check + run: composer lint + - name: Deprecations check + run: composer deprecations diff --git a/composer.json b/composer.json index 4c384d3..84a1e7a 100644 --- a/composer.json +++ b/composer.json @@ -8,13 +8,14 @@ }, "extra": { "terminus": { - "compatible-version": "^1|^2" + "compatible-version": "^3 || ^4" } }, "scripts": { "cs": "phpcs --standard=PSR2 -n src", "cbf": "phpcbf --standard=PSR2 -n src", "lint": "find src -name '*.php' -print0 | xargs -0 -n1 php -l", + "deprecations": "find src -name '*.php' -print0 | xargs -0 -n1 php -l 2>&1 >/dev/null | tee /tmp/deprecations ; [ ! -s /tmp/deprecations ]", "unit": "phpunit --colors=always tests", "functional": "TERMINUS_PLUGINS_DIR=.. PATH=tools/bin:$PATH bats -p -t tests/functional", "install-bats": "if [ ! -f tools/bin/bats ] ; then git clone https://github.com/sstephenson/bats.git tools/bats; tools/bats/install.sh tools; fi",