From 4e6d2b3b6e2446d1b5176e92f18d1de858be8a11 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 30 May 2024 09:54:26 +1200 Subject: [PATCH] MNT Run module-standardiser --- .github/workflows/dispatch-ci.yml | 9 +++++++-- .github/workflows/keepalive.yml | 8 ++++++-- .github/workflows/merge-up.yml | 9 +++++++-- composer.json | 6 ++++-- phpstan.neon.dist | 3 +++ 5 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 phpstan.neon.dist diff --git a/.github/workflows/dispatch-ci.yml b/.github/workflows/dispatch-ci.yml index a3cc755..2440b57 100644 --- a/.github/workflows/dispatch-ci.yml +++ b/.github/workflows/dispatch-ci.yml @@ -1,9 +1,11 @@ name: Dispatch CI on: - # At 11:10 AM UTC, only on Thursday and Friday + # At 11:55 AM UTC, only on Friday and Saturday schedule: - - cron: '10 11 * * 4,5' + - cron: '55 11 * * 5,6' + +permissions: {} jobs: dispatch-ci: @@ -11,6 +13,9 @@ jobs: # Only run cron on the silverstripe account if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') runs-on: ubuntu-latest + permissions: + contents: read + actions: write steps: - name: Dispatch CI uses: silverstripe/gha-dispatch-ci@v1 diff --git a/.github/workflows/keepalive.yml b/.github/workflows/keepalive.yml index 73ccc26..62a5c21 100644 --- a/.github/workflows/keepalive.yml +++ b/.github/workflows/keepalive.yml @@ -1,17 +1,21 @@ name: Keepalive on: - # At 6:30 PM UTC, on day 11 of the month + # At 8:40 AM UTC, on day 13 of the month schedule: - - cron: '30 18 11 * *' + - cron: '40 8 13 * *' workflow_dispatch: +permissions: {} + jobs: keepalive: name: Keepalive # Only run cron on the silverstripe account if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') runs-on: ubuntu-latest + permissions: + actions: write steps: - name: Keepalive uses: silverstripe/gha-keepalive@v1 diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml index 239f65b..3885f51 100644 --- a/.github/workflows/merge-up.yml +++ b/.github/workflows/merge-up.yml @@ -1,17 +1,22 @@ name: Merge-up on: - # At 11:10 AM UTC, only on Monday + # At 11:55 AM UTC, only on Tuesday schedule: - - cron: '10 11 * * 1' + - cron: '55 11 * * 2' workflow_dispatch: +permissions: {} + jobs: merge-up: name: Merge-up # Only run cron on the silverstripe account if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') runs-on: ubuntu-latest + permissions: + contents: write + actions: write steps: - name: Merge-up uses: silverstripe/gha-merge-up@v1 diff --git a/composer.json b/composer.json index f02ba18..3a32041 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,9 @@ "require-dev": { "phpunit/phpunit": "^9.6", "squizlabs/php_codesniffer": "^3", - "silverstripe/versioned": "^2" + "silverstripe/versioned": "^2", + "silverstripe/standards": "^1", + "phpstan/extension-installer": "^1.3" }, "extra": [], "autoload": { @@ -32,4 +34,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +} diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..beb9de3 --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,3 @@ +parameters: + paths: + - src