From cdc2a4f3b48f73558aa1110aa1cde55db1e92a59 Mon Sep 17 00:00:00 2001 From: tuutti Date: Tue, 22 Oct 2024 10:08:47 +0300 Subject: [PATCH] UHF-10248: Run tests against automatic updates --- .github/workflows/test.yml | 4 ++-- .github/workflows/update-config.yml | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4a302d7..f7eb84b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,8 +51,8 @@ jobs: - name: Run PHPCS run: | - vendor/bin/phpcs public/modules/custom/ --ignore="*.js,*.css" --extensions=php,module,install --standard=Drupal,DrupalPractice - vendor/bin/phpcs public/themes/custom/ --ignore="*.js,*.css" --extensions=php,theme --standard=Drupal,DrupalPractice + vendor/bin/phpcs public/modules/custom/ + vendor/bin/phpcs public/themes/custom/ - name: Run phpstan run: vendor/bin/phpstan analyze diff --git a/.github/workflows/update-config.yml b/.github/workflows/update-config.yml index 1a7d61f7..d36258dd 100644 --- a/.github/workflows/update-config.yml +++ b/.github/workflows/update-config.yml @@ -24,6 +24,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Check if required secrets are set + env: + AUTOMATIC_UPDATE_TOKEN: ${{ secrets.AUTOMATIC_UPDATE_TOKEN }} + if: env.AUTOMATIC_UPDATE_TOKEN == '' + run: exit 1 + - name: Download latest dump env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -77,6 +83,7 @@ jobs: uses: peter-evans/create-pull-request@v6 with: commit-message: Update configuration + token: ${{ secrets.AUTOMATIC_UPDATE_TOKEN }} title: Automatic update labels: auto-update body: |