From 003605261aabba0a957e5b2979e41233bcc14a16 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 21 Mar 2023 12:02:31 +1300 Subject: [PATCH] MNT Use gha-dispatch-ci --- .codecov.yml | 1 - .github/workflows/ci.yml | 6 ++++-- .github/workflows/dispatch-ci.yml | 16 ++++++++++++++++ .github/workflows/keepalive.yml | 17 +++++++++++++++++ .scrutinizer.yml | 15 --------------- .travis.yml | 4 ---- README.md | 22 +++++++++------------- phpunit.xml.dist | 1 + 8 files changed, 47 insertions(+), 35 deletions(-) delete mode 100644 .codecov.yml create mode 100644 .github/workflows/dispatch-ci.yml create mode 100644 .github/workflows/keepalive.yml delete mode 100644 .scrutinizer.yml delete mode 100644 .travis.yml diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 69cb760..0000000 --- a/.codecov.yml +++ /dev/null @@ -1 +0,0 @@ -comment: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c19d6e8..bf02210 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,11 @@ -name: Module CI +name: CI on: push: pull_request: + workflow_dispatch: jobs: ci: - uses: silverstripe/github-actions-ci-cd/.github/workflows/ci.yml@0.1.9 + name: CI + uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 diff --git a/.github/workflows/dispatch-ci.yml b/.github/workflows/dispatch-ci.yml new file mode 100644 index 0000000..23a0b7b --- /dev/null +++ b/.github/workflows/dispatch-ci.yml @@ -0,0 +1,16 @@ +name: Dispatch CI + +on: + # At 4:00 PM UTC, only on Sunday and Monday + schedule: + - cron: '0 16 * * 0,1' + +jobs: + dispatch-ci: + name: Dispatch CI + # Only run cron on the silverstripe account + if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (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 new file mode 100644 index 0000000..776ccee --- /dev/null +++ b/.github/workflows/keepalive.yml @@ -0,0 +1,17 @@ +name: Keepalive + +on: + workflow_dispatch: + # At 4:50 PM UTC, on day 8 of the month + schedule: + - cron: '50 16 8 * *' + +jobs: + keepalive: + name: Keepalive + # Only run cron on the bringyourownideas account + if: (github.event_name == 'schedule' && github.repository_owner == 'bringyourownideas') || (github.event_name != 'schedule') + runs-on: ubuntu-latest + steps: + - name: Keepalive + uses: silverstripe/gha-keepalive@v1 diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 051ef9a..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,15 +0,0 @@ -inherit: true - -build: - nodes: - analysis: - tests: - override: [php-scrutinizer-run] - -checks: - php: - code_rating: true - duplication: true - -filter: - paths: [src/*, tests/*] diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c244c3b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -version: ~> 1.0 - -import: - - silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-range.yml diff --git a/README.md b/README.md index 3cdde58..4074f55 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ -# SilverStripe Maintenance +# Silverstripe Maintenance -[![Build Status](https://api.travis-ci.org/bringyourownideas/silverstripe-maintenance.svg?branch=master)](https://travis-ci.org/bringyourownideas/silverstripe-maintenance) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/bringyourownideas/silverstripe-maintenance/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/bringyourownideas/silverstripe-maintenance/?branch=master) -[![codecov](https://codecov.io/gh/bringyourownideas/silverstripe-maintenance/branch/master/graph/badge.svg)](https://codecov.io/gh/bringyourownideas/silverstripe-maintenance) -[![SilverStripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/) +[![CI](https://github.com/bringyourownideas/silverstripe-maintenance/actions/workflows/ci.yml/badge.svg)](https://github.com/bringyourownideas/silverstripe-maintenance/actions/workflows/ci.yml) +[![Silverstripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/) ## Overview -The [SilverStripe Maintenance module](https://github.com/bringyourownideas/silverstripe-maintenance "Assists with the -maintenance of your SilverStripe application") reduces your maintenance related work. +The [Silverstripe Maintenance module](https://github.com/bringyourownideas/silverstripe-maintenance "Assists with the +maintenance of your Silverstripe application") reduces your maintenance related work. ![UI Preview](docs/en/_img/ui-with-sec-alert.png) @@ -18,9 +16,9 @@ maintenance of your SilverStripe application") reduces your maintenance related * The [queuedjobs module](https://github.com/symbiote/silverstripe-queuedjobs) updates metadata on your installed modules in the background. You need to [configure](https://github.com/symbiote/silverstripe-queuedjobs) it to run those jobs. * For the optional update checkers, the webserver environment needs to be able to contact external information sources through network requests * SilverStripe: - * Maintenance ^2.2: SilverStripe ^4.4 - * Maintenance ~2.1.0: SilverStripe 4.0-4.3 - * Maintenance: ^1.0: SilverStripe 3.x + * Maintenance ^2.2: Silverstripe ^4.4 + * Maintenance ~2.1.0: Silverstripe 4.0-4.3 + * Maintenance: ^1.0: Silverstripe 3.x ### Suggested Modules @@ -34,7 +32,6 @@ we recommend the installation of the following additional module: The previously recommended silverstripe-composer-security-checker module [can't work anymore](https://github.com/bringyourownideas/silverstripe-composer-security-checker/issues/57) and isn't recommended to be used anymore. - ### Installation Option 1 (recommended): Install the maintenance package and suggested dependency @@ -73,7 +70,6 @@ Run the update task (includes the [update-checker](https://github.com/bringyouro sake dev/tasks/UpdatePackageInfoTask ``` - ## How your composer.json influences the report The report available through the CMS shows "Available" and "Latest" versions (see [user guide](docs/en/userguide/index.md)). @@ -90,7 +86,7 @@ Please see the [user guide](docs/en/userguide/index.md) section. ## Contributing Contributions are welcome! Create an issue, explaining a bug or propose development ideas. Find more information on -[contributing](https://docs.silverstripe.org/en/contributing/) in the SilverStripe developer documentation. +[contributing](https://docs.silverstripe.org/en/contributing/) in the Silverstripe developer documentation. ## Reporting Issues diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e190cd3..23ee219 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,3 +1,4 @@ + tests/