From 9023dac885944bb236664fd07db1c86510570e88 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 5 Jul 2022 16:16:42 +1200 Subject: [PATCH] MNT Adding workflow files --- .github/workflows/ci.yml | 15 +++++++++++++++ .github/workflows/keepalive.yml | 16 ++++++++++++++++ .travis.yml | 27 --------------------------- README.md | 2 +- 4 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/keepalive.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..006e446 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,15 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + schedule: + - cron: '20 11 * * 7' + +jobs: + ci: + name: CI + # Only run cron on the silverstripe account + if: (github.event_name == 'schedule' && startsWith(github.repository, 'silverstripe/')) || (github.event_name != 'schedule') + uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 diff --git a/.github/workflows/keepalive.yml b/.github/workflows/keepalive.yml new file mode 100644 index 0000000..d5d0584 --- /dev/null +++ b/.github/workflows/keepalive.yml @@ -0,0 +1,16 @@ +name: Keepalive + +on: + schedule: + - cron: '50 11 21 * *' + workflow_dispatch: + +jobs: + keepalive: + name: Keepalive + # Only run cron on the silverstripe account + if: (github.event_name == 'schedule' && startsWith(github.repository, 'silverstripe/')) || (github.event_name != 'schedule') + runs-on: ubuntu-latest + steps: + - name: Keepalive + uses: silverstripe/gha-keepalive@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9945986..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -sudo: false -language: php -php: - - '5.6' - -env: - global: - secure: "fQhSvmkxT2mrzIL9tfY54KVRIXWrMZo1bjOx4mfNOrKyrkG3GnIUndSmTAZQU/NTiXDIH+N8aIEP3VpDEfDv4XxI3A+5CAayJKTGuLDcyXy0vVf54BfzebG38oH93v2VE2YTeoG/L+Nb6A4+/hb+/sG2vWol+IKD1av/HxZdZZo=" - -before_script: - - git config user.email "community@silverstripe.org" - - git config user.name "SilverStripe" - # This inverted conditional format ensures that PRs/non-master branches don't report a failure - - '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*' - - '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || git config push.default simple' - - '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || git fetch --unshallow' - - '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || git remote set-url origin "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}"' - - '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || git checkout -qf "${TRAVIS_COMMIT}"' - -script: - - composer selfupdate || true - - composer install --dev --no-progress --no-interaction - - bin/build-phar - - vendor/bin/phpunit tests - -after_success: - - '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || bin/upload-phar > /dev/null 2>&1' diff --git a/README.md b/README.md index 44b0e42..856cf3d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SSPak -[![Build Status](https://api.travis-ci.com/silverstripe/sspak.svg?branch=master)](https://travis-ci.com/silverstripe/sspak) +[![CI](https://github.com/silverstripe/sspak/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/sspak/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/) [![Code Quality](http://img.shields.io/scrutinizer/g/silverstripe/sspak.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe/sspak)