Skip to content

Commit

Permalink
cron yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ewallah committed Feb 7, 2021
1 parent 8dc404e commit a301b35
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Tests

on:
schedule:
- cron: "5 10 9 * *"

jobs:
ci:
name: ci
runs-on: ubuntu-18.04

services:
mariadb:
image: mariadb
env:
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3
ports:
- 3306:3306

strategy:
fail-fast: true
matrix:
moodle-branch: ['master']
php: ['7.4']
database: ['mariadb']

steps:
- name: checkout plugin
uses: actions/checkout@v2
with:
path: this-plugin

- name: setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, pgsql, mysqli
tools: composer, behat, phpunit, phpmd, phpcbf, phpcpd, psalm, phpcs
coverage: xdebug

- name: checkout moodle-plugin-ci
uses: actions/checkout@v2
with:
repository: moodlehq/moodle-plugin-ci
path: ci

- name: other
run: |
cd ci
composer install
echo "$(cd bin; pwd)" >> $GITHUB_PATH
echo "$(cd vendor/bin; pwd)" >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
- name: install Moodle
run: moodle-plugin-ci install --db-host=127.0.0.1 --plugin this-plugin
env:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}

- name: phplint
run: moodle-plugin-ci phplint

- name: phpcpd
run: moodle-plugin-ci phpcpd

- name: phpmd
run: moodle-plugin-ci phpmd

- name: codechecker
run: moodle-plugin-ci codechecker

- name: validate
run: moodle-plugin-ci validate

- name: savepoints
run: moodle-plugin-ci savepoints

- name: mustache
run: moodle-plugin-ci mustache

- name: grunt
run: moodle-plugin-ci grunt

- name: phpunit
run: moodle-plugin-ci phpunit --coverage-text

- name: firefox
run: moodle-plugin-ci behat

- name: chrome
run: moodle-plugin-ci behat --profile chrome

- name: coveralls
env:
COVERALLS_RUN_LOCALLY: true
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: moodle-plugin-ci coveralls-upload
if: matrix.moodle-branch == 'master'

0 comments on commit a301b35

Please sign in to comment.