diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml new file mode 100644 index 0000000..da2cd4c --- /dev/null +++ b/.github/workflows/lint-test.yml @@ -0,0 +1,30 @@ +name: lint-test + +on: + push: + branches: + - '**' + +jobs: + lint-test: + name: lint+test + runs-on: ubuntu-latest + strategy: + matrix: + php-version: ["8.1", "8.2", "8.3"] + drupal-version: ["10.2", "10.3", "10.4", "11.0"] + exclude: + - drupal-version: "11.0.x" + php-version: "8.1" + - drupal-version: "11.0.x" + php-version: "8.2" + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: lint+test + working-directory: ci + run: docker compose up -d --quiet-pull + env: + PHP_VERSION: ${{ matrix.php-version }} + DRUPAL_VERSION: ${{ matrix.drupal-version }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 74bf9eb..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: lint - -on: - push: - branches: - -jobs: - phpcs: - name: Run PHPCS with Drupal Standards - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up PHP and Composer - uses: shivammathur/setup-php@v2 - with: - php-version: '8.3' - tools: phpcs - coverage: none - - - name: Install Drupal Coder Standards - run: | - composer global config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true - composer global require --no-interaction drupal/coder slevomat/coding-standard - COMPOSER_HOME=$(composer config --global home) - phpcs --config-set installed_paths \ - "$COMPOSER_HOME/vendor/drupal/coder/coder_sniffer,$COMPOSER_HOME/vendor/slevomat/coding-standard" - phpcs -i - - - name: Run PHPCS - run: phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme --ignore=vendor/ ./ - - - name: Run DrupalPractice - run: phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme --ignore=vendor/ ./ diff --git a/ci/docker-compose.yml b/ci/docker-compose.yml new file mode 100644 index 0000000..7519f4e --- /dev/null +++ b/ci/docker-compose.yml @@ -0,0 +1,7 @@ +networks: + default: +services: + drupal: + image: lehighlts/drupal-ci:${DRUPAL_VERSION}-php${PHP_VERSION} + volumes: + - ../:/var/www/drupal/web/modules/contrib/turnstile_protect