Update mariadb version for tests #33
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub Actions docs | |
# https://help.github.com/en/articles/about-github-actions | |
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | |
name: CI | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['7.3', '7.4', '8.0'] | |
name: lint (${{ matrix.php-versions }}) | |
env: | |
extensions: zip | |
key: cache-v1 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup cache environment | |
id: extcache | |
uses: shivammathur/cache-extensions@v1 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: ${{ env.extensions }} | |
key: ${{ env.key }} | |
- name: Cache extensions | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.extcache.outputs.dir }} | |
key: ${{ steps.extcache.outputs.key }} | |
restore-keys: ${{ steps.extcache.outputs.key }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: ${{ env.extensions }} | |
- name: Cache Composer dependencies | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/composer-cache | |
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | |
- uses: php-actions/composer@v6 | |
with: | |
php_version: ${{ matrix.php-versions }} | |
- name: Lint | |
run: php vendor/bin/robo --no-interaction code:cs | |
phpunit-GSIT-latest: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['7.3', '7.4', '8.0'] | |
gsit-versions: ['9.5.12'] | |
name: phpunit-GSIT-latest (${{ matrix.gsit-versions }}) | PHP(${{ matrix.php-versions }}) | |
env: | |
extensions: zip, hash, fileinfo, mysqli, gd, bz2, xdebug | |
key: cache-v1 | |
steps: | |
- uses: ankane/setup-mariadb@v1 | |
with: | |
mariadb-version: 10.11 | |
- uses: actions/checkout@v1 | |
- name: Setup cache environment | |
id: extcache | |
uses: shivammathur/cache-extensions@v1 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: ${{ env.extensions }} | |
key: ${{ env.key }} | |
- name: Cache extensions | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.extcache.outputs.dir }} | |
key: ${{ steps.extcache.outputs.key }} | |
restore-keys: ${{ steps.extcache.outputs.key }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: ${{ env.extensions }} | |
- name: Cache Composer dependencies | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/composer-cache | |
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | |
- uses: php-actions/composer@v6 | |
with: | |
php_version: ${{ matrix.php-versions }} | |
- name: Get GSIT | |
run: wget https://github.com/DCS-Easyware/gsit/releases/download/GSIT-${{ matrix.gsit-versions }}/gsit-${{ matrix.gsit-versions }}.tgz | |
- name: Uncompress GSIT | |
run: tar zxvf gsit-${{ matrix.gsit-versions }}.tgz | |
- name: Copy Plugin FusionInventory | |
run: rsync -avr --exclude='gsit' ./* gsit/plugins/fusioninventory/ | |
- name: Create the database | |
run: mysqladmin create gsit | |
- name: Check php dependencies | |
run: cd gsit && php bin/console glpi:system:check_requirements | |
- name: Install GSIT | |
run: cd gsit && mkdir tests && php bin/console glpi:database:install -n --config-dir=tests --db-name=glpi --db-user=root | |
- name: Install plugin FusionInventory | |
run: cd gsit && php bin/console glpi:plugin:install -vvv -n --config-dir=tests --username=glpi fusioninventory | |
- name: Activate plugin FusionInventory | |
run: cd gsit && php bin/console glpi:plugin:activate -n --config-dir=tests fusioninventory | |
- name: run tests | |
run: cd gsit/plugins/fusioninventory/ && php vendor/bin/phpunit --testdox tests/ | |
phpunit-GSIT-previous: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['7.4'] | |
gsit-versions: ['9.5.8','9.5.9'] | |
name: phpunit-GSIT-latest (${{ matrix.gsit-versions }}) | PHP(${{ matrix.php-versions }}) | |
env: | |
extensions: zip, hash, fileinfo, mysqli, gd, bz2, xdebug | |
key: cache-v1 | |
steps: | |
- uses: ankane/setup-mariadb@v1 | |
with: | |
mariadb-version: 10.11 | |
- uses: actions/checkout@v1 | |
- name: Setup cache environment | |
id: extcache | |
uses: shivammathur/cache-extensions@v1 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: ${{ env.extensions }} | |
key: ${{ env.key }} | |
- name: Cache extensions | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.extcache.outputs.dir }} | |
key: ${{ steps.extcache.outputs.key }} | |
restore-keys: ${{ steps.extcache.outputs.key }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: ${{ env.extensions }} | |
- name: Cache Composer dependencies | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/composer-cache | |
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | |
- uses: php-actions/composer@v6 | |
with: | |
php_version: ${{ matrix.php-versions }} | |
- name: Get GSIT | |
run: wget https://github.com/DCS-Easyware/gsit/releases/download/GSIT-${{ matrix.gsit-versions }}/gsit-${{ matrix.gsit-versions }}.tgz | |
- name: Uncompress GSIT | |
run: tar zxvf gsit-${{ matrix.gsit-versions }}.tgz | |
- name: Copy Plugin FusionInventory | |
run: rsync -avr --exclude='gsit' ./* gsit/plugins/fusioninventory/ | |
- name: Create the database | |
run: mysqladmin create gsit | |
- name: Check php dependencies | |
run: cd gsit && php bin/console glpi:system:check_requirements | |
- name: Install GSIT | |
run: cd gsit && mkdir tests && php bin/console glpi:database:install -n --config-dir=tests --db-name=glpi --db-user=root | |
- name: Install plugin FusionInventory | |
run: cd gsit && php bin/console glpi:plugin:install -vvv -n --config-dir=tests --username=glpi fusioninventory | |
- name: Activate plugin FusionInventory | |
run: cd gsit && php bin/console glpi:plugin:activate -n --config-dir=tests fusioninventory | |
- name: run tests | |
run: cd gsit/plugins/fusioninventory/ && php vendor/bin/phpunit --testdox tests/ |