-
Notifications
You must be signed in to change notification settings - Fork 5
103 lines (83 loc) · 2.74 KB
/
cron.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Cron
on:
schedule:
- cron: "5 10 9 * *"
jobs:
ci:
name: ci
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
moodle-branch: ['main']
php: ['8.1']
database: ['mysqli']
steps:
- name: checkout plugin
uses: actions/checkout@v3
with:
path: this-plugin
- name: setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: max_input_vars=5000
coverage: pcov
- name: npm cache
uses: actions/cache@v3
with:
path: ~/.npm
key: node-${{ matrix.php }}-${{ matrix.moodle-branch }}-${{ matrix.database }}-cache
restore-keys: |
node-${{ matrix.php }}-${{ matrix.moodle-branch }}-${{ matrix.database }}-cache
- name: composer
run: |
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^4
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
sudo systemctl start mysql.service
- name: install Moodle
run: moodle-plugin-ci install --db-user=root --db-pass=root --db-host=127.0.0.1 --plugin this-plugin
env:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
- name: phplint
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi phplint
- name: phpcpd
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi phpcpd
- name: phpmd
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi phpmd
- name: phpdoc
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi phpdoc
- name: codechecker
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi codechecker
- name: validate
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi validate
- name: savepoints
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi savepoints
- name: grunt
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi grunt || true
- name: mustache
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi mustache
- name: phpunit
continue-on-error: true
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi phpunit --coverage-text --coverage-clover
- name: coveralls
if: ${{ !cancelled() }}
run: moodle-plugin-ci coveralls-upload || true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: behat
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi behat --profile=chrome