Skip to content

Commit

Permalink
Update metadata and workflows for PHP 8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ralflang committed Dec 18, 2021
1 parent 96a6f12 commit d54cbc6
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 36 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,54 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- master
- maintaina-composerfixed
- FRAMEWORK_6_0
pull_request:
branches:
- master
- maintaina-composerfixed
- FRAMEWORK_6_0


# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-20.04']
php-versions: ['7.4', '8.0', 'latest']
phpunit-versions: ['latest', '9.5']
steps:
- name: Setup github ssh key
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter
ini-values: post_max_size=512M, max_execution_time=360
coverage: xdebug
tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}, composer:v2
- name: Setup Github Token as composer credential
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
- name: Install horde/test dependency and other dependencies
run: |
## For unclear reasons, github action fails randomly if we do not install before we require.
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer config minimum-stability dev
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer install
- name: run phpunit
run: phpunit --bootstrap test/bootstrap.php
69 changes: 69 additions & 0 deletions .github/workflows/phpdoc.yml
@@ -0,0 +1,69 @@
# This is a basic workflow to help you get started with Actions

name: PHPDOC

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- master
- maintaina-composerfixed
- FRAMEWORK_6_0
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
run:
runs-on: ubuntu-20.04
steps:
- name: Setup github ssh key
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
- name: Setup uut dir
run: |
export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
export UUT_DIR=$(pwd)
export WORK_DIR=~
export BIN_DIR="${WORK_DIR}/bin"
mkdir -p $BIN_DIR
git config --global user.name "PHPDOC CI Job"
git config --global user.email "ci-job@maintaina.com"
- name: Checkout
uses: actions/checkout@v2
- name: Checkout Doc Dir
uses: actions/checkout@v2
with:
repository: maintaina/phpdoc
token: ${{secrets.PHPDOC_TOKEN}}
path: "phpdoc-git"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter
ini-values: post_max_size=512M, max_execution_time=360
coverage: xdebug
tools: composer:v2
- name: Setup Github Token as composer credential
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
- name: phpdocumentor run
run: |
export UUT_DIR=$(pwd)
export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
export WORK_DIR=/home/runner/
export BIN_DIR="${WORK_DIR}/bin"
wget https://phpdoc.org/phpDocumentor.phar
mkdir "${WORK_DIR}/phpdoc-out"
mv phpDocumentor.phar $BIN_DIR/phpdocumentor
chmod +x "${BIN_DIR}/phpdocumentor"
echo "Creating UUT related dir in docu repo"
mkdir -p $UUT_DIR/phpdoc-git/${GITHUB_REF##*/}/${REPO}/
## Look into any of lib, src, app (if they exist) but not test, migration, bin, locale or script dirs
$BIN_DIR/phpdocumentor -d $UUT_DIR/lib/ -d $UUT_DIR/src/ -d $UUT_DIR/app/ -t "${UUT_DIR}/phpdoc-git/${GITHUB_REF##*/}/${REPO}/"
cd ${UUT_DIR}/phpdoc-git
git add "${GITHUB_REF##*/}/${REPO}"
php indexer.php ${GITHUB_REF##*/} $REPO
git add index.html index.json
git commit -m "Updated phpdoc for $GITHUB_REPOSITORY (${GITHUB_REF##*/} branch) from ci"
git push
8 changes: 2 additions & 6 deletions .github/workflows/update-satis.yml
Expand Up @@ -52,12 +52,8 @@ jobs:
export WORK_DIR=/home/runner/
export BIN_DIR="${WORK_DIR}/bin"
composer create-project composer/satis:dev-main
php satis/bin/satis build -vvv maintaina-com.github.io/satis.json maintaina-com.github.io/ horde/kolab_cli
php satis/bin/satis build -vvv maintaina-com.github.io/satis.json maintaina-com.github.io/ horde/${REPO,,}
cd maintaina-com.github.io
git add include/ index.html p2/ packages.json
git commit -m "Update for horde/kolab_cli"
git commit -m "Update for horde/${REPO,,}"
git push
30 changes: 15 additions & 15 deletions .horde.yml
Expand Up @@ -22,22 +22,22 @@ state:
release: alpha
api: alpha
license:
identifier: LGPL-2.1
identifier: LGPL-2.1-only
uri: http://www.horde.org/licenses/lgpl21
dependencies:
required:
php: ^5.3 || ^7
pear:
pear.horde.org/Horde_Autoloader: ^2
pear.horde.org/Horde_Cli: ^2
pear.horde.org/Horde_Cli_Modular: ^2
pear.horde.org/Horde_Imap_Client: ^2
pear.horde.org/Horde_Kolab_Storage: ^2
pear.horde.org/Horde_Log: ^2
pear.horde.org/Horde_Translation: ^2.2
pear.horde.org/Horde_Util: ^2
php: ^7.4 || ^8
composer:
horde/autoloader: ^3
horde/cli: ^3
horde/cli_modular: ^3
horde/imap_client: ^3
horde/kolab_storage: ^3
horde/log: ^3
horde/translation: ^3
horde/util: ^3
optional:
pear:
pear.horde.org/Horde_Support: ^2
pear.horde.org/Horde_Test: ^2.1
pear.horde.org/Horde_Yaml: ^2
composer:
horde/support: ^3
horde/test: ^3
horde/yaml: ^3
30 changes: 15 additions & 15 deletions composer.json
Expand Up @@ -3,15 +3,15 @@
"description": "Kolab storage command line interface library",
"type": "horde-library",
"homepage": "https://www.horde.org/libraries/Horde_Kolab_Cli",
"license": "LGPL-2.1",
"license": "LGPL-2.1-only",
"authors": [
{
"name": "Gunnar Wrobel",
"email": "p@rdus.de",
"role": "lead"
}
],
"version": "1.0.0beta1",

"time": "2020-10-27",
"repositories": [
{
Expand All @@ -20,21 +20,21 @@
}
],
"require": {
"horde/horde-installer-plugin": "dev-master",
"php": "^5.3 || ^7",
"horde/autoloader": "dev-master",
"horde/cli": "dev-master",
"horde/cli_modular": "dev-master",
"horde/imap_client": "dev-master",
"horde/kolab_storage": "dev-master",
"horde/log": "dev-master",
"horde/translation": "dev-master",
"horde/util": "dev-master"
"horde/horde-installer-plugin": "^2 || dev-FRAMEWORK_6_0",
"php": "^7.4 || ^8",
"horde/autoloader": "dev-FRAMEWORK_6_0 || ^3",
"horde/cli": "dev-FRAMEWORK_6_0 || ^3",
"horde/cli_modular": "dev-FRAMEWORK_6_0 || ^3",
"horde/imap_client": "dev-FRAMEWORK_6_0 || ^3",
"horde/kolab_storage": "dev-FRAMEWORK_6_0 || ^3",
"horde/log": "dev-FRAMEWORK_6_0 || ^3",
"horde/translation": "dev-FRAMEWORK_6_0 || ^3",
"horde/util": "dev-FRAMEWORK_6_0 || ^3"
},
"suggest": {
"horde/support": "^2",
"horde/test": "^2.1",
"horde/yaml": "^2"
"horde/support": "^3 || dev-FRAMEWORK_6_0",
"horde/test": "^3 || dev-FRAMEWORK_6_0",
"horde/yaml": "^3 || dev-FRAMEWORK_6_0"
},
"autoload": {
"psr-0": {
Expand Down

0 comments on commit d54cbc6

Please sign in to comment.