diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..862eaeb --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,49 @@ +name: CI + +on: [push, pull_request] + +jobs: + tests: + runs-on: ubuntu-latest + + strategy: + matrix: + php: [5.6, 7.0, 7.1] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: zip, pdo, sqlite + coverage: none + + - name: Checkout Laravel Sample + uses: actions/checkout@v2 + with: + repository: codeception/codeception-laravel5-sample + path: framework-tests + ref: codeception-3.0 + + - name: Install Laravel Sample + run: | + composer update --no-dev --prefer-dist --no-interaction + cp .env.testing .env + touch storage/testing.sqlite + php artisan migrate --env=testing --database=sqlite_testing --force + php artisan config:clear + working-directory: framework-tests + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-interaction --no-suggest + + - name: Run test suite + run: | + php vendor/bin/codecept build -c framework-tests + php vendor/bin/codecept run functional -c framework-tests diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9d2ba47..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: php - -php: - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - -# faster builds on new travis setup not using sudo -sudo: false - -services: - - mysql - -install: - - '[[ -z "$CI_USER_TOKEN" ]] || composer config github-oauth.github.com ${CI_USER_TOKEN};' - - travis_retry composer self-update && composer --version - - travis_retry composer update --prefer-dist --no-interaction - - git clone -q --depth=1 -b codeception-3.0 https://github.com/codeception/codeception-laravel5-sample.git framework-tests - - git --git-dir framework-tests/.git log -n 1 - - travis_retry composer update -d framework-tests --no-dev --prefer-dist --no-interaction - - php ./vendor/bin/codecept build -c framework-tests - -before_script: - - touch framework-tests/storage/testing.sqlite - - php framework-tests/artisan migrate --env=testing --database=sqlite_testing --force - - php framework-tests/artisan config:clear -script: - - php ./vendor/bin/codecept run functional -c framework-tests diff --git a/composer.json b/composer.json index e29d008..f50cba4 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,6 @@ } ], "minimum-stability": "RC", - "require": { "php": ">=5.6.0 <8.0", "codeception/lib-innerbrowser": "^1.0", diff --git a/readme.md b/readme.md index 4fb0429..869cd23 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # Codeception module for Laravel 5 framework -[![Build Status](https://travis-ci.org/Codeception/module-laravel5.svg?branch=master)](https://travis-ci.org/Codeception/module-laravel5) +![Build Status](https://github.com/Codeception/module-laravel5/workflows/CI/badge.svg) ## Installation