Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
Maxime Rainville | ee49a440fb | |
Steve Boyd | cb34aa869f | |
Steve Boyd | 5c8070044c | |
Maxime Rainville | 8e3f71afb7 | |
Steve Boyd | fe5e87598f |
|
@ -4,13 +4,8 @@ on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# Every Monday at 2:30pm UTC
|
|
||||||
schedule:
|
|
||||||
- cron: '30 14 * * 1'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
name: CI
|
name: CI
|
||||||
# Only run cron on the silverstripe account
|
|
||||||
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
|
|
||||||
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
|
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
name: Dispatch CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
# At 2:30 PM UTC, only on Monday and Tuesday
|
||||||
|
schedule:
|
||||||
|
- cron: '30 14 * * 1,2'
|
||||||
|
|
||||||
|
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
|
|
@ -529,7 +529,10 @@ class TestSessionEnvironment
|
||||||
public function getState()
|
public function getState()
|
||||||
{
|
{
|
||||||
$path = Director::getAbsFile($this->getFilePath());
|
$path = Director::getAbsFile($this->getFilePath());
|
||||||
return (file_exists($path ?? '')) ? json_decode(file_get_contents($path)) : new stdClass;
|
if (file_exists($path ?? '')) {
|
||||||
|
return json_decode(file_get_contents($path)) ?: new stdClass;
|
||||||
|
}
|
||||||
|
return new stdClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue