diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml new file mode 100644 index 00000000..bbd00392 --- /dev/null +++ b/.github/workflows/test-application.yaml @@ -0,0 +1,83 @@ +name: Test application + +on: + pull_request: + push: + branches: + - 'master' + +jobs: + test: + name: 'PHP ${{ matrix.php-version }}, Behat Suite ${{ matrix.behat-suite }}, Dependencies ${{ matrix.dependencies }}' + runs-on: ubuntu-latest + + env: + SYMFONY_DEPRECATIONS_HELPER: ${{ matrix.symfony-deprecation-helper }} + BEHAT_SUITE: ${{ matrix.behat-suite }} + + strategy: + fail-fast: false + + matrix: + include: + - php-version: '7.2' + dependencies: lowest + behat-suite: standalone + + - php-version: '7.2' + dependencies: lowest + behat-suite: embedded + + - php-version: '7.2' + dependencies: lowest + behat-suite: cli + + - php-version: '7.4' + dependencies: highest + behat-suite: standalone + + - php-version: '7.4' + dependencies: highest + behat-suite: embedded + + - php-version: '7.4' + dependencies: highest + behat-suite: cli + + - php-version: '8.0' + dependencies: highest + behat-suite: standalone + + - php-version: '8.0' + dependencies: highest + behat-suite: embedded + + - php-version: '8.0' + dependencies: highest + behat-suite: cli + + steps: + - name: Checkout project + uses: actions/checkout@v2 + + - name: Install and configure PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + tools: 'composer:v2' + + - name: Install dependencies with Composer + uses: ramsey/composer-install@v1 + with: + dependency-versions: ${{ matrix.dependencies }} + composer-options: ${{ matrix.composer-options }} + + - name: Start Jackrabbit + run: | + tests/bin/travis_jackrabbit.sh + + - name: Execute test cases + run: | + vendor/bin/phpunit + vendor/bin/phpspec run + vendor/behat/behat/bin/behat --suite=${{ matrix.behat-suite }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1761f139..00000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -language: php -dist: trusty - -matrix: - include: - - php: 7.2 - env: - - PREFER="--prefer-lowest" - - BEHAT_SUITE=standalone - - php: 7.2 - env: - - PREFER="--prefer-lowest" - - BEHAT_SUITE=embedded - - php: 7.2 - env: - - PREFER="--prefer-lowest" - - BEHAT_SUITE=cli - - php: 7.4 - env: - - PREFER="" - - BEHAT_SUITE=standalone - - php: 7.4 - env: - - PREFER="" - - BEHAT_SUITE=embedded - - php: 7.4 - env: - - PREFER="" - - BEHAT_SUITE=cli - -before_script: - - composer self-update - - composer update $PREFER - - bash tests/bin/travis_jackrabbit.sh - -script: - - vendor/bin/phpunit - - php vendor/bin/phpspec run - - php vendor/behat/behat/bin/behat --suite=$BEHAT_SUITE diff --git a/composer.json b/composer.json index 421ae919..2030e4f3 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "phpcr/phpcr-shell", "description": "Shell for PHPCR", "require": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "symfony/console": "^5.0", "jackalope/jackalope": "^1.3.4", "phpcr/phpcr": "^2.1",