diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..82b910d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,16 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + # Every Sunday at 12:20pm UTC + schedule: + - cron: '20 12 * * 0' + +jobs: + ci: + name: CI + # Only run cron on the symbiote account + if: (github.event_name == 'schedule' && startsWith(github.repository, 'symbiote/')) || (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..2bf6251 --- /dev/null +++ b/.github/workflows/keepalive.yml @@ -0,0 +1,17 @@ +name: Keepalive + +on: + workflow_dispatch: + # The 18th of every month at 12:50pm UTC + schedule: + - cron: '50 12 18 * *' + +jobs: + keepalive: + name: Keepalive + # Only run cron on the symbiote account + if: (github.event_name == 'schedule' && startsWith(github.repository, 'symbiote/')) || (github.event_name != 'schedule') + runs-on: ubuntu-latest + steps: + - name: Keepalive + uses: silverstripe/gha-keepalive@v1 diff --git a/README.md b/README.md index 0891586..b09b626 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SilverStripe MultiValueField module -[![Build Status](https://travis-ci.org/symbiote/silverstripe-multivaluefield.svg?branch=master)](https://travis-ci.org/symbiote/silverstripe-multivaluefield) +[![CI](https://github.com/symbiote/silverstripe-multivaluefield/actions/workflows/ci.yml/badge.svg)](https://github.com/symbiote/silverstripe-multivaluefield/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/) Notes: diff --git a/tests/MultiValueFieldTest_DataObject.php b/tests/MultiValueFieldTest_DataObject.php index 44f2ab5..a5d1efa 100644 --- a/tests/MultiValueFieldTest_DataObject.php +++ b/tests/MultiValueFieldTest_DataObject.php @@ -6,12 +6,12 @@ */ class MultiValueFieldTest_DataObject extends \SilverStripe\ORM\DataObject implements \SilverStripe\Dev\TestOnly { + private static $table_name = 'MultiValueFieldTest_DataObject'; private static $db = array( 'MVField' => 'MultiValueField' ); - public function write($showDebug = false, $forceInsert = false, $forceWrite = false, $writeComponents = false) { parent::write($showDebug, $forceInsert, $forceWrite, $writeComponents);