Skip to content

Commit

Permalink
chore: molireali
Browse files Browse the repository at this point in the history
  • Loading branch information
petrknap committed May 21, 2024
1 parent 3b7b422 commit de3497d
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: https://petrknap.github.io/donate.html
7 changes: 4 additions & 3 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Docker
name: composer ci-script

on:
pull_request:

jobs:
build-and-run:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: docker build -t $GITHUB_REPOSITORY:$GITHUB_SHA .
- run: docker run $GITHUB_REPOSITORY:$GITHUB_SHA composer ci-script
- name: Run composer ci-script
run: docker run $GITHUB_REPOSITORY:$GITHUB_SHA composer ci-script
2 changes: 1 addition & 1 deletion .github/workflows/linter-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
image: hadolint/hadolint:latest-alpine
steps:
- uses: actions/checkout@v3
- run: find . -name 'Dockerfile' -or -name '*.dockerfile' -exec hadolint {} \;
- run: find . -name 'Dockerfile' -or -name '*.dockerfile' | xargs -trn 1 hadolint
4 changes: 2 additions & 2 deletions .github/workflows/linter-php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
PHP:
runs-on: ubuntu-latest
container:
image: php:8.0-cli-alpine
image: php:8.1-cli-alpine
steps:
- uses: actions/checkout@v3
- run: find . -name '*.php' -exec php -l {} \;
- run: find . -name '*.php' | xargs -trn 1 php -l
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/bin/
/vendor/
/composer.lock
4 changes: 2 additions & 2 deletions .molireali
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
authors
composer PetrKnap\\SpaydQr
dockerfile php 8.0-cli
dockerfile php 8.1-cli
docker-scripts petrknap/php-spaydqr
donation
git-crlf "*.bat"
github-workflow docker "composer ci-script"
github-workflow linter-docker
github-workflow linter-php 8.0
github-workflow linter-php 8.1
license LGPL-3.0-or-later
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.0-cli
FROM php:8.1-cli

# region included composer
# hadolint ignore=DL3008
Expand Down Expand Up @@ -26,7 +26,7 @@ RUN apt-get update \
libmcrypt-dev \
libpng-dev \
&& docker-php-ext-configure gd \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install -j"$(nproc)" gd \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
;
Expand All @@ -36,6 +36,8 @@ RUN docker-php-ext-install \
bcmath \
;

# region included composer-library
WORKDIR /app
COPY . .
RUN composer update --prefer-lowest
# endregion
30 changes: 24 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
{
"WARNING": "This file is updated automatically. All keys will be overwritten, except of 'conflict', 'keywords', 'require', 'require-dev' and 'scripts'.",
"WARNING": "This file is updated automatically. All keys will be overwritten, except of 'conflict', 'keywords', 'require', 'require-dev', 'scripts' and 'suggest'.",
"autoload": {
"psr-4": {
"PetrKnap\\SpaydQr\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"PetrKnap\\SpaydQr\\Test\\": "tests"
"PetrKnap\\SpaydQr\\": "tests"
}
},
"config": {
"allow-plugins": false,
"sort-packages": true
},
"description": "Short Payment Descriptor (SPayD) with QR output",
"funding": [
{
"type": "other",
"url": "https://petrknap.github.io/donate.html"
}
],
"homepage": "https://github.com/petrknap/php-spaydqr",
"homepage": "https://github.com/petrknap/php-spayd-qr",
"keywords": [
"spayd",
"qrcode",
Expand All @@ -27,15 +31,16 @@
"license": "LGPL-3.0-or-later",
"name": "petrknap/spayd-qr",
"require": {
"php": ">=8.0",
"php": ">=8.1",
"endroid/qr-code": "^4.1",
"moneyphp/money": "^4.0",
"sunfoxcz/spayd-php": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "^3.7",
"phpstan/phpstan": "^1.10"
"phpstan/phpstan": "^1.10",
"nunomaduro/phpinsights": "^2.11"
},
"scripts": {
"test": [
Expand All @@ -47,7 +52,20 @@
"phpstan analyse --level 5 tests"
],
"ci-script": [
"@validate",
"@check-requirements",
"@check-implementation",
"@test-implementation"
],
"check-requirements": [
"composer outdated \"petrknap/*\" --major-only --strict --ansi --no-interaction"
],
"check-implementation": [
"phpcs --colors --standard=PSR12 --exclude=Generic.Files.LineLength src tests",
"phpstan analyse --level max src --ansi --no-interaction",
"phpstan analyse --level 5 tests --ansi --no-interaction",
"phpinsights analyse src --ansi --no-interaction"
],
"test-implementation": [
"@test"
]
}
Expand Down

0 comments on commit de3497d

Please sign in to comment.