Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design reusable GitHub Action for moodle-plugin-ci #53

Open
kabalin opened this issue Nov 21, 2020 · 0 comments
Open

Design reusable GitHub Action for moodle-plugin-ci #53

kabalin opened this issue Nov 21, 2020 · 0 comments

Comments

@kabalin
Copy link
Member

kabalin commented Nov 21, 2020

Consider creating a dedicated Action for moodle-plugin-ci, and list it in the marketplace (good example PHP Action), so that developer who want to enable CI for their plugin would only need to create workflow similar to:

name: Moodle Plugin CI

on: [ push, pull_request ]

jobs:
  pluginci:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        php-versions: ['7.3', '7.4']
        database: ['pgsql', 'mariadb']
        moodle-version: ['MOODLE_39_STABLE', 'MOODLE_310_STABLE', 'master']
    steps:
    - name: Check out repository code
      uses: actions/checkout@v2
      with:
        # Clone in plugin subdir, so we can setup CI in default directory.
        path: plugin

    - name: Setup moodle-plugin-ci
      uses: moodlehq/moodle-plugin-ci@v3
      with:
          database: ${{ matrix.database }}
          branch: ${{ matrix.moodle-version }}
          pluginpath: ./plugin

    - name: Run Integration tests
      run: |
        moodle-plugin-ci phplint
        moodle-plugin-ci phpcpd
        ....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant