diff --git a/.github/workflows/dispatch-ci.yml b/.github/workflows/dispatch-ci.yml new file mode 100644 index 00000000..3a331652 --- /dev/null +++ b/.github/workflows/dispatch-ci.yml @@ -0,0 +1,16 @@ +name: Dispatch CI + +on: + # At 8:40 PM UTC, only on Saturday and Sunday + schedule: + - cron: '40 20 * * 6,0' + +jobs: + dispatch-ci: + name: Dispatch CI + # Only run cron on the tractorcow-farm account + if: (github.event_name == 'schedule' && github.repository_owner == 'tractorcow-farm') || (github.event_name != 'schedule') + runs-on: ubuntu-latest + steps: + - name: Dispatch CI + uses: silverstripe/gha-dispatch-ci@v1 diff --git a/.github/workflows/keepalive.yml b/.github/workflows/keepalive.yml index 86f09119..ffeabacd 100644 --- a/.github/workflows/keepalive.yml +++ b/.github/workflows/keepalive.yml @@ -1,9 +1,9 @@ name: Keepalive on: - # At 12:05 AM UTC, on day 20 of the month + # At 8:40 PM UTC, on day 21 of the month schedule: - - cron: '5 0 20 * *' + - cron: '40 20 21 * *' workflow_dispatch: jobs: diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml index 86973a33..3e9dfb7c 100644 --- a/.github/workflows/merge-up.yml +++ b/.github/workflows/merge-up.yml @@ -1,9 +1,9 @@ name: Merge-up on: - # At 12:05 AM UTC, only on Tuesday + # At 8:40 PM UTC, only on Wednesday schedule: - - cron: '5 0 * * 2' + - cron: '40 20 * * 3' workflow_dispatch: jobs: diff --git a/.github/workflows/update-js.yml b/.github/workflows/update-js.yml new file mode 100644 index 00000000..f225311f --- /dev/null +++ b/.github/workflows/update-js.yml @@ -0,0 +1,17 @@ +name: Update JS + +on: + workflow_dispatch: + # Run on a schedule of once per quarter + schedule: + - cron: '40 20 1 */3 *' + +jobs: + update-js: + name: Update JS + # Only run cron on the tractorcow-farm account + if: (github.event_name == 'schedule' && github.repository_owner == 'tractorcow-farm') || (github.event_name != 'schedule') + runs-on: ubuntu-latest + steps: + - name: Update JS + uses: silverstripe/gha-update-js@v1 diff --git a/composer.json b/composer.json index d3cad270..e3b38a1c 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,9 @@ "silverstripe/cms": "Localise pages" }, "require-dev": { - "silverstripe/recipe-testing": "^3" + "silverstripe/recipe-testing": "^3", + "silverstripe/standards": "^1", + "phpstan/extension-installer": "^1.3" }, "extra": { "branch-alias": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 00000000..beb9de3c --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,3 @@ +parameters: + paths: + - src