Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
name: Cron
2
 
3
on:
4
  schedule:
5
    - cron: "5 10 9 * *"
6
 
7
jobs:
8
  ci:
9
    name: ci
10
    runs-on: ubuntu-latest
11
 
12
    strategy:
13
      fail-fast: false
14
      matrix:
15
        moodle-branch: ['main']
16
        php: ['8.1']
17
        database: ['mysqli']
18
 
19
    steps:
20
      - name: checkout plugin
21
        uses: actions/checkout@v4
22
        with:
23
          path: this-plugin
24
 
25
      - name: setup PHP
26
        uses: shivammathur/setup-php@v2
27
        with:
28
          php-version: ${{ matrix.php }}
29
          ini-values: max_input_vars=5000
30
          coverage: pcov
31
 
32
      - name: composer
33
        run: |
34
           composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci
35
           echo $(cd ci/bin; pwd) >> $GITHUB_PATH
36
           echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
37
           sudo locale-gen en_AU.UTF-8
38
           sudo systemctl start mysql.service
39
 
40
      - name: install Moodle
41
        run: moodle-plugin-ci install --db-user=root --db-pass=root --db-host=127.0.0.1 --plugin this-plugin
42
        env:
43
          DB: ${{ matrix.database }}
44
          MOODLE_BRANCH: ${{ matrix.moodle-branch }}
45
 
46
      - name: phplint
47
        if: ${{ !cancelled() }}
48
        run: moodle-plugin-ci --ansi phplint
49
 
50
      - name: phpmd
51
        if: ${{ !cancelled() }}
52
        run: moodle-plugin-ci --ansi phpmd
53
 
54
      - name: phpdoc
55
        if: ${{ !cancelled() }}
56
        run: moodle-plugin-ci --ansi phpdoc
57
 
58
      - name: codechecker
59
        if: ${{ !cancelled() }}
60
        run: moodle-plugin-ci --ansi codechecker
61
 
62
      - name: validate
63
        if: ${{ !cancelled() }}
64
        run: moodle-plugin-ci --ansi validate
65
 
66
      - name: savepoints
67
        if: ${{ !cancelled() }}
68
        run: moodle-plugin-ci --ansi savepoints
69
 
70
      - name: grunt
71
        if: ${{ !cancelled() }}
72
        run: moodle-plugin-ci --ansi grunt
73
 
74
      - name: mustache
75
        if: ${{ !cancelled() }}
76
        run: moodle-plugin-ci --ansi mustache
77
 
78
      - name: phpunit
79
        if: ${{ !cancelled() }}
80
        run: moodle-plugin-ci --ansi phpunit --coverage-text --coverage-clover
81
 
82
      - name: behat
83
        if: ${{ !cancelled() }}
84
        run: moodle-plugin-ci --ansi behat --profile=chrome
85
 
86
      - name: privacy
87
        if: ${{ !cancelled() }}
88
        run: vendor/bin/phpunit --colors --no-coverage --testsuite tool_dataprivacy_testsuite,tool_policy_testsuite,core_privacy_testsuite
89
        working-directory: moodle
90
 
91
      - name: coveralls
92
        if: ${{ !cancelled() }}
93
        run: moodle-plugin-ci coveralls-upload || true
94
        env:
95
          COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}