From 35cffeefc38648f401cdeb610940edf251f04c56 Mon Sep 17 00:00:00 2001 From: tuutti Date: Wed, 17 Jan 2024 11:13:43 +0200 Subject: [PATCH] UHF-8762: Disable ci for now, simpletest db --- .github/workflows/ci.yml | 91 ++++++++++++++++++------------------ .github/workflows/visual.yml | 2 + 2 files changed, 48 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50d09230f..fabf75d1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,45 +1,46 @@ -on: - pull_request: - push: - branches: - - main -name: CI -jobs: - tests: - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: ['8.1'] - container: - image: ghcr.io/city-of-helsinki/drupal-php-docker:${{ matrix.php-versions }}-alpine - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Set variables - run: echo "DRUPAL_ROOT=$HOME/drupal" >> $GITHUB_ENV - - - name: Parse $THEME_NAME from composer.json - run: echo "THEME_NAME=$(cat composer.json | jq -r .name | awk -F/ '{print $NF}')" >> $GITHUB_ENV - - - name: Clone platform - run: git clone https://github.com/City-of-Helsinki/drupal-helfi-platform.git $DRUPAL_ROOT - - - name: Build project - run: | - cd $DRUPAL_ROOT - composer config repositories.5 path $GITHUB_WORKSPACE - composer require drupal/$THEME_NAME -W - - - name: Check that theme is not built with dev mode - run: if grep -q 'sourceMappingURL=' -R public/themes/contrib/$THEME_NAME/dist/css; then exit 1; fi - - - name: Run PHPCS - run: | - cd $DRUPAL_ROOT - vendor/bin/phpcs public/themes/contrib/$THEME_NAME --extensions=php,theme,module --standard=Drupal,DrupalPractice - - - name: Run phpstan - working-directory: ${{ env.DRUPAL_ROOT }} - run: vendor/bin/phpstan analyze -c public/themes/contrib/$THEME_NAME/phpstan.neon public/themes/contrib/$THEME_NAME +#on: +# pull_request: +# push: +# branches: +# - main +#name: CI +#jobs: +# tests: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# php-versions: ['8.1'] +# container: +# image: ghcr.io/city-of-helsinki/drupal-php-docker:${{ matrix.php-versions }}-alpine +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 1 +# +# - name: Set variables +# run: echo "DRUPAL_ROOT=$HOME/drupal" >> $GITHUB_ENV +# +# - name: Parse $THEME_NAME from composer.json +# run: echo "THEME_NAME=$(cat composer.json | jq -r .name | awk -F/ '{print $NF}')" >> $GITHUB_ENV +# +# - name: Clone platform +# run: git clone https://github.com/City-of-Helsinki/drupal-helfi-platform.git $DRUPAL_ROOT +# +# - name: Build project +# run: | +# cd $DRUPAL_ROOT +# composer config repositories.5 path $GITHUB_WORKSPACE +# composer require drupal/$THEME_NAME -W +# +# - name: Check that theme is not built with dev mode +# run: if grep -q 'sourceMappingURL=' -R public/themes/contrib/$THEME_NAME/dist/css; then exit 1; fi +# +# - name: Run PHPCS +# run: | +# cd $DRUPAL_ROOT +# vendor/bin/phpcs public/themes/contrib/$THEME_NAME --extensions=php,theme,module --standard=Drupal,DrupalPractice +# +# - name: Run phpstan +# working-directory: ${{ env.DRUPAL_ROOT }} +# run: vendor/bin/phpstan analyze -c public/themes/contrib/$THEME_NAME/phpstan.neon public/themes/contrib/$THEME_NAME +# diff --git a/.github/workflows/visual.yml b/.github/workflows/visual.yml index e56b703dc..46a3a025a 100644 --- a/.github/workflows/visual.yml +++ b/.github/workflows/visual.yml @@ -3,6 +3,8 @@ on: push: branches: - main +env: + SIMPLETEST_DB: mysql://drupal:drupal@db:3306/drupal name: Visual regression tests jobs: tests: