Skip to content

Commit 53bec4c

Browse files
committed
use new centralized workflow definitions
1 parent cddc4e7 commit 53bec4c

File tree

4 files changed

+22
-54
lines changed

4 files changed

+22
-54
lines changed

Skeletor.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,16 @@ public function addComponent($type, $component = '', $options = [])
154154
*/
155155
public function addTest($test = '')
156156
{
157-
$test = ucfirst(strtolower($test));
158-
$this->loadSkeleton('.github/workflows/phpTestLinux.yml');
157+
// pick a random day and time for the cron job
158+
$cron = sprintf(
159+
'%d %d %d * *',
160+
random_int(0, 59),
161+
random_int(0, 23),
162+
random_int(1, 28)
163+
);
164+
165+
$test = ucfirst($test);
166+
$this->loadSkeleton('.github/workflows/dokuwiki.yml', '', ['@@CRON@@' => $cron]);
159167
if ($test) {
160168
$replacements = ['@@TEST@@' => $test];
161169
$this->loadSkeleton('_test/StandardTest.php', '_test/' . $test . 'Test.php', $replacements);

cli.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ protected function cmdRmObsolete()
370370
{
371371
$this->deleteFile('_test/general.test.php');
372372
$this->deleteFile('.travis.yml');
373+
$this->deleteFile('.github/workflows/phpTestLinux.yml');
373374

374375
return 0;
375376
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: DokuWiki Default Tasks
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: '@@CRON@@'
7+
8+
9+
jobs:
10+
all:
11+
uses: dokuwiki/github-action/.github/workflows/all.yml@main

skel/.github/workflows/phpTestLinux.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)