glpi-project / plugin-ci-workflows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin CI workflows

Continuous integration workflow

This workflow will execute the following actions as long as they are available on the checked repository.

Action Required package Required config file
PHP Parallel Lint php-parallel-lint/php-parallel-lint
PHP CodeSniffer squizlabs/php_codesniffer .phpcs.xml
PHPStan phpstan/phpstan phpstan.neon
ESLint eslint .eslintrc.js
Stylelint stylelint .stylelintrc.js
Licence headers check glpi-project/tools tools/HEADER
PHPUnit phpunit/phpunit phpunit.xml
Jest jest jest.config.js

You can use this workflow in any plugin using the following Github Actions configuration. You will have to use your plugin system name in the plugin-key parameter.

name: "Continuous integration"

on:
  push:
    branches:
      - "main"
    tags:
       - "*"
  pull_request:
  schedule:
    - cron: "0 0 * * *"

jobs:
  ci:
    name: "GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}"
    strategy:
      fail-fast: false
      matrix:
        include:
          - {glpi-version: "10.0.x", php-version: "7.4", db-image: "mysql:5.7"}
          - {glpi-version: "10.0.x", php-version: "8.2", db-image: "mariadb:10.6"}
    uses: "glpi-project/plugin-ci-workflows/.github/workflows/continuous-integration.yml@v1"
    with:
      plugin-key: "myplugin"
      glpi-version: "${{ matrix.glpi-version }}"
      php-version: "${{ matrix.php-version }}"
      db-image: "${{ matrix.db-image }}"

The available glpi-version/php-version combinations corresponds to the ghcr.io/glpi-project/githubactions-glpi images tags that can be found here.

The db-image parameter is a combination of the DB server engine (mysql, mariadb or percona) and the server version.

  • MariaDB available versions are listed here
  • MySQL available versions are listed here.
  • Percona available versions are listed here.

About

License:MIT License