Skip to content

Commit 7026574

Browse files
committed
Update metadata and workflows - define dev dependencies.
1 parent 0f514ae commit 7026574

File tree

7 files changed

+113
-7
lines changed

7 files changed

+113
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
matrix:
2929
operating-system: ['ubuntu-20.04']
30-
php-versions: ['7.4', '8.0', 'latest']
30+
php-versions: ['7.4', '8.0', '8.1', 'latest']
3131
phpunit-versions: ['latest', '9.5']
3232
steps:
3333
- name: Setup github ssh key
@@ -49,6 +49,7 @@ jobs:
4949
run: |
5050
## For unclear reasons, github action fails randomly if we do not install before we require.
5151
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer config minimum-stability dev
52+
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer config allow-plugins true
5253
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer install
5354
- name: run phpunit
5455
run: phpunit --bootstrap test/bootstrap.php

.github/workflows/release.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
name: make release
3+
4+
# manual workflow to make a new release for the default branch
5+
on:
6+
workflow_dispatch:
7+
branches:
8+
- FRAMEWORK_6_0
9+
env:
10+
components: "/home/runner/.composer/web/components/bin/horde-components -c /home/runner/.composer/web/components/config/maintaina.conf.dist"
11+
12+
jobs:
13+
run:
14+
runs-on: ${{ matrix.operating-system }}
15+
strategy:
16+
matrix:
17+
operating-system: ['ubuntu-20.04']
18+
php-versions: ['7.4']
19+
steps:
20+
- name: Setup git
21+
run: |
22+
mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
23+
git config --global user.name "Github CI Runner"
24+
git config --global user.email "[email protected]"
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
with:
28+
fetch-depth: 0
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php-versions }}
33+
extensions: gettext
34+
ini-values: post_max_size=512M, max_execution_time=360
35+
tools: composer:v2
36+
- name: Setup composer
37+
run: |
38+
composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
39+
composer global config repositories.0 composer https://horde-satis.maintaina.com
40+
composer global config minimum-stability dev
41+
composer config --no-plugins --global allow-plugins true
42+
composer global require horde/components "dev-FRAMEWORK_6_0"
43+
- name: write changelog
44+
run: |
45+
entries_amount=0; max_entries=100
46+
PATTERN="^\[.*\] .*"
47+
48+
for commit in $(git rev-list FRAMEWORK_6_0)
49+
do
50+
msg=$(git log --format=%B -n 1 $commit | head -n 1)
51+
if [ $entries_amount -gt $max_entries ]; then break; fi
52+
if [[ $msg == 'Released'* ]]; then break; fi
53+
if [[ $msg == 'Development mode for'* ]]; then break; fi
54+
if [[ $msg =~ $PATTERN ]]; then
55+
$components changed "$msg"
56+
let "entries_amount+=1"
57+
fi
58+
done
59+
- name: make release and push
60+
run: |
61+
$components release for maintaina
62+
git push
63+
git push origin --tags

.github/workflows/update-satis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
export WORK_DIR=~
2626
export BIN_DIR="${WORK_DIR}/bin"
2727
mkdir -p $BIN_DIR
28-
git config --global user.name "PHPDOC CI Job"
28+
git config --global user.name "Satis Repository CI Job"
2929
git config --global user.email "[email protected]"
3030
- name: Checkout
3131
uses: actions/checkout@v2
@@ -52,6 +52,7 @@ jobs:
5252
export WORK_DIR=/home/runner/
5353
export BIN_DIR="${WORK_DIR}/bin"
5454
composer create-project composer/satis:dev-main
55+
composer global config --no-plugins allow-plugins true
5556
php satis/bin/satis build -vvv maintaina-com.github.io/satis.json maintaina-com.github.io/ horde/${REPO,,}
5657
cd maintaina-com.github.io
5758
git add include/ index.html p2/ packages.json

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ run-tests.log
2727
/test/*/*/*/*.log
2828
/test/*/*/*/*.out
2929

30+
# Ignore test harness / quality tools output
31+
.php-cs-fixer.cache
32+
.phpunit.cache/
33+
34+
# ignore composer artifacts
35+
composer.lock
36+
vendor/

.horde.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ dependencies:
3636
horde/nls: ^3
3737
horde/translation: ^3
3838
optional:
39+
composer:
40+
horde/icalendar: ^3
41+
ext:
42+
calendar: '*'
43+
dev:
3944
composer:
4045
horde/icalendar: ^3
4146
horde/test: ^3

.php-cs-fixer.dist.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
$finder = PhpCsFixer\Finder::create()
6+
// Lib is for legacy
7+
->exclude('lib')
8+
// doc may contain ancient examples or illustrational shorthand
9+
->exclude('doc')
10+
->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
11+
->in(__DIR__)
12+
;
13+
14+
$config = new PhpCsFixer\Config();
15+
return $config->setRules([
16+
'@PSR12' => true,
17+
'@PHP81Migration' => true,
18+
'ordered_imports' => true,
19+
'strict_param' => true,
20+
'declare_strict_types' => true,
21+
'method_argument_space' => true,
22+
'array_syntax' => ['syntax' => 'short'],
23+
])
24+
->setFinder($finder)->setFormat('txt')->setRiskyAllowed(true);
25+
;

composer.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"minimum-stability": "dev",
32
"name": "horde/date",
43
"description": "Date library",
54
"type": "library",
@@ -17,7 +16,7 @@
1716
"role": "lead"
1817
}
1918
],
20-
"time": "2022-10-08",
19+
"time": "2022-10-10",
2120
"repositories": [
2221
{
2322
"type": "composer",
@@ -30,7 +29,11 @@
3029
"horde/nls": "^3 || dev-FRAMEWORK_6_0",
3130
"horde/translation": "^3 || dev-FRAMEWORK_6_0"
3231
},
33-
"require-dev": {},
32+
"require-dev": {
33+
"horde/icalendar": "^3 || dev-FRAMEWORK_6_0",
34+
"horde/test": "^3 || dev-FRAMEWORK_6_0",
35+
"ext-calendar": "*"
36+
},
3437
"suggest": {
3538
"horde/icalendar": "^3 || dev-FRAMEWORK_6_0",
3639
"horde/test": "^3 || dev-FRAMEWORK_6_0",
@@ -50,5 +53,6 @@
5053
"allow-plugins": {
5154
"horde/horde-installer-plugin": true
5255
}
53-
}
54-
}
56+
},
57+
"minimum-stability": "dev"
58+
}

0 commit comments

Comments
 (0)