From 6d6b41e8308d754207ea0e29e89bba307b2af151 Mon Sep 17 00:00:00 2001 From: Claudiu Cristea Date: Mon, 14 Nov 2022 09:31:48 +1100 Subject: [PATCH 1/2] Replaced Travis with GitHub actions. --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ .travis.yml | 12 ------------ docker-compose.yml | 17 +++++++++++++++++ 3 files changed, 49 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml create mode 100644 docker-compose.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b46e1bc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: ci +on: [push, pull_request_target] +jobs: + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php_version: ["7.4", "8.0", "8.1"] + drupal_version: ["9"] + exclude: + - php_version: "7.4" + drupal_version: "10" + - php_version: "8.0" + drupal_version: "10" + env: + PHP_VERSION: ${{ matrix.php_version }} + DRUPAL_VERSION: ${{ matrix.drupal_version }} + DOCKER_USER_ID: "1001" + steps: + - name: clone + uses: actions/checkout@v3 + - name: docker-compose up -d + run: docker-compose up -d + - name: composer self-update + run: docker-compose exec -T php composer self-update + - name: composer require + run: docker-compose exec -u ${DOCKER_USER_ID} -T php composer require --no-interaction --dev --no-update drupal/core:^${DRUPAL_VERSION} + - name: composer install + run: docker-compose exec -T php composer install + - name: composer test + run: docker-compose exec -T php composer test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 69e2c7c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: php - -php: - - 7.4 - - 8.0 - - 8.1 - -install: - - composer install - -script: - - composer test diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..38dd332 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,17 @@ +version: "2" +services: + + php: + image: wodby/drupal-php:${PHP_VERSION} + environment: + PHP_FPM_USER: wodby + PHP_FPM_GROUP: wodby + PHP_FPM_CLEAR_ENV: "yes" + PHP_OPCACHE_PRELOAD_USER: wodby + PHP_XDEBUG_MODE: "off" + PHP_XDEBUG_REMOTE_CONNECT_BACK: 1 + PHP_XDEBUG_REMOTE_HOST: "10.254.254.254" + PHP_XDEBUG_IDEKEY: "PHPSTORM" + PHP_IDE_CONFIG: "serverName=drupaldriver" + volumes: + - ./:/var/www/html From 805be2f39a0eac71c485bbd4825540b2e15757d5 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 23 Nov 2022 08:09:05 +1100 Subject: [PATCH 2/2] Update .github/workflows/ci.yml Co-authored-by: Claudiu Cristea --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b46e1bc..0132916 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: ci -on: [push, pull_request_target] +on: [push, pull_request] jobs: tests: runs-on: ubuntu-latest