Skip to content

Added CI testing with PHP 8.2 and PHP 8.3 #16

Added CI testing with PHP 8.2 and PHP 8.3

Added CI testing with PHP 8.2 and PHP 8.3 #16

Workflow file for this run

name: On pull request
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
matrix:
os:
- ubuntu-latest
php_version:
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
database:
- mysql:5.6
- mariadb:10.1
impresscms_version:
- dev-TNG
composer_version:
- 2
services:
mysql:
image: ${{ matrix.database }}
env:
MYSQL_ROOT_PASSWORD: icms
MYSQL_DATABASE: icms
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
name: Test - impresscms:${{ matrix.impresscms_version }}; php:${{ matrix.php_version }}; ${{ matrix.database }}; ${{ matrix.os }}; composer:${{ matrix.composer_version }};
steps:
- name: Checkouting project code...
uses: actions/checkout@v4
- name: Testing addon...
uses: impresscms-dev/test-impresscms-addon-action@v0.3
with:
impresscms_version: ${{ matrix.impresscms_version }}
php_version: ${{ matrix.php_version }}
composer_version: ${{ matrix.composer_version }}
database_type: pdo.mysql
database_name: icms
database_user: root
database_password: icms
database_port: ${{ job.services.mysql.ports['3306'] }}
addon_requirements_update: "true"
dependabot:
needs: test
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
# Checking the actor will prevent your Action run failing on non-Dependabot
# PRs but also ensures that it only does work for Dependabot PRs.
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
# This first step will fail if there's no metadata and so the approval
# will not occur.
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
# Here the PR gets approved.
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Finally, this sets the PR to allow auto-merging for patch and minor
# updates if all checks pass
- name: Enable auto-merge for Dependabot PRs
# if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}