Skip to content

Commit ae4d98a

Browse files
committed
lint: format files
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
1 parent 69eaa6a commit ae4d98a

22 files changed

+407
-407
lines changed

.github/workflows/build-deploy.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
name: 📦 Create and publish release Docker image
22
on:
3-
push:
4-
branches: [release]
5-
workflow_dispatch:
6-
# build and deploy automatically once a month
7-
schedule:
8-
- cron: "7 0 1 * *"
3+
push:
4+
branches: [release]
5+
workflow_dispatch:
6+
# build and deploy automatically once a month
7+
schedule:
8+
- cron: "7 0 1 * *"
99

1010
env:
11-
IMAGE_NAME: pbeke/qownnotes-api
12-
IMAGE_TAG: latest-v3
11+
IMAGE_NAME: pbeke/qownnotes-api
12+
IMAGE_TAG: latest-v3
1313

1414
jobs:
15-
build:
16-
runs-on: ubuntu-latest
15+
build:
16+
runs-on: ubuntu-latest
1717

18-
steps:
19-
- uses: actions/checkout@v2
20-
- name: Set up QEMU
21-
uses: docker/setup-qemu-action@v1
22-
- name: Set up Docker Buildx
23-
uses: docker/setup-buildx-action@v1
24-
- name: Login to DockerHub
25-
uses: docker/login-action@v1
26-
with:
27-
username: ${{ secrets.DOCKERHUB_USERNAME }}
28-
password: ${{ secrets.DOCKERHUB_TOKEN }}
29-
- name: Build and push
30-
id: docker_build
31-
uses: docker/build-push-action@v2
32-
with:
33-
push: true
34-
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
35-
- name: Image digest
36-
run: echo ${{ steps.docker_build.outputs.digest }}
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up QEMU
21+
uses: docker/setup-qemu-action@v1
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v1
24+
- name: Login to DockerHub
25+
uses: docker/login-action@v1
26+
with:
27+
username: ${{ secrets.DOCKERHUB_USERNAME }}
28+
password: ${{ secrets.DOCKERHUB_TOKEN }}
29+
- name: Build and push
30+
id: docker_build
31+
uses: docker/build-push-action@v2
32+
with:
33+
push: true
34+
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
35+
- name: Image digest
36+
run: echo ${{ steps.docker_build.outputs.digest }}
3737
# - name: Run Trivy vulnerability scanner
3838
# uses: aquasecurity/trivy-action@7b7aa264d83dc58691451798b4d117d53d21edfe
3939
# with:

.github/workflows/format-check.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
name: 📄 Check formatting
22

33
on:
4-
push:
5-
branches-ignore:
6-
- release
7-
tags-ignore:
8-
- "*"
9-
pull_request:
10-
workflow_dispatch:
4+
push:
5+
branches-ignore:
6+
- release
7+
tags-ignore:
8+
- "*"
9+
pull_request:
10+
workflow_dispatch:
1111

1212
jobs:
13-
format-check:
14-
name: 📄 Check code formatting with "just fmt"
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v4
18-
- uses: cachix/install-nix-action@v31
19-
with:
20-
nix_path: nixpkgs=channel:nixos-unstable
21-
- run: nix-shell -p just --run "just fmt --ci"
13+
format-check:
14+
name: 📄 Check code formatting with "just fmt"
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: cachix/install-nix-action@v31
19+
with:
20+
nix_path: nixpkgs=channel:nixos-unstable
21+
- run: nix-shell -p just --run "just fmt --ci"

.github/workflows/test.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
name: Test
22
on:
3-
push:
4-
branches:
5-
- "**" # This will match all branches
6-
- "!release" # This excludes the release branch
7-
pull_request:
8-
branches:
9-
- "**" # This will match all branches
10-
- "!release" # This excludes the release branch
11-
workflow_dispatch:
3+
push:
4+
branches:
5+
- "**" # This will match all branches
6+
- "!release" # This excludes the release branch
7+
pull_request:
8+
branches:
9+
- "**" # This will match all branches
10+
- "!release" # This excludes the release branch
11+
workflow_dispatch:
1212

1313
jobs:
14-
build:
15-
runs-on: ubuntu-latest
14+
build:
15+
runs-on: ubuntu-latest
1616

17-
steps:
18-
- uses: actions/checkout@v2
19-
# - name: Install packages
20-
# run: sudo apt -y --no-install-recommends install ca-certificates curl git php7.4-cli php7.4-curl php7.4-json php7.4-mbstring php7.4-xml php7.4-gmp composer
21-
- name: Install dependencies
22-
uses: php-actions/composer@v5
23-
with:
24-
php_version: 8.2
25-
version: 2
26-
- name: Run tests
27-
uses: php-actions/composer@v6
28-
with:
29-
command: run test
30-
php_version: 8.2
31-
version: 2
32-
env:
33-
# because of: 1x: Class "ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client" should implement method "Symfony\Contracts\HttpClient\HttpClientInterface::withOptions(array $options)": Returns a new instance of the client with new default options.
34-
SYMFONY_DEPRECATIONS_HELPER: weak
35-
# - name: PHPUnit tests
36-
# uses: php-actions/phpunit@v2
37-
# with:
38-
# php_version: 8.2
39-
# version: 8
40-
# - name: Run tests
41-
# run: vendor/bin/simple-phpunit
42-
# - name: Run tests
43-
# run: php7.4 vendor/bin/simple-phpunit
44-
- name: Try to build docker image
45-
run: docker build .
17+
steps:
18+
- uses: actions/checkout@v2
19+
# - name: Install packages
20+
# run: sudo apt -y --no-install-recommends install ca-certificates curl git php7.4-cli php7.4-curl php7.4-json php7.4-mbstring php7.4-xml php7.4-gmp composer
21+
- name: Install dependencies
22+
uses: php-actions/composer@v5
23+
with:
24+
php_version: 8.2
25+
version: 2
26+
- name: Run tests
27+
uses: php-actions/composer@v6
28+
with:
29+
command: run test
30+
php_version: 8.2
31+
version: 2
32+
env:
33+
# because of: 1x: Class "ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client" should implement method "Symfony\Contracts\HttpClient\HttpClientInterface::withOptions(array $options)": Returns a new instance of the client with new default options.
34+
SYMFONY_DEPRECATIONS_HELPER: weak
35+
# - name: PHPUnit tests
36+
# uses: php-actions/phpunit@v2
37+
# with:
38+
# php_version: 8.2
39+
# version: 8
40+
# - name: Run tests
41+
# run: vendor/bin/simple-phpunit
42+
# - name: Run tests
43+
# run: php7.4 vendor/bin/simple-phpunit
44+
- name: Try to build docker image
45+
run: docker build .

composer.json

Lines changed: 99 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,105 @@
11
{
2-
"name": "qownnotes/api",
3-
"type": "project",
4-
"license": "AGPL-3.0-or-later",
5-
"require": {
6-
"php": ">=8.1",
7-
"ext-ctype": "*",
8-
"ext-dom": "*",
9-
"ext-iconv": "*",
10-
"ext-json": "*",
11-
"api-platform/core": "^3.3",
12-
"composer/package-versions-deprecated": "^1.11",
13-
"doctrine/annotations": "^1.0",
14-
"doctrine/cache": "^1.12",
15-
"doctrine/doctrine-bundle": "^2.1",
16-
"doctrine/doctrine-migrations-bundle": "^3.0",
17-
"doctrine/orm": "^2.7",
18-
"guzzlehttp/guzzle": "^7.5.0",
19-
"kevinrob/guzzle-cache-middleware": "^4.0 || ^5.0",
20-
"league/uri": "^6.3.0",
21-
"matomo/matomo-php-tracker": "^3.0",
22-
"michelf/php-markdown": "^1.9",
23-
"nelmio/cors-bundle": "^2.1",
24-
"symfony/asset": "6.4.*",
25-
"symfony/console": "6.4.*",
26-
"symfony/dotenv": "6.4.*",
27-
"symfony/expression-language": "6.4.*",
28-
"symfony/flex": "^1.3.1",
29-
"symfony/framework-bundle": "6.4.*",
30-
"symfony/property-access": "6.4.*",
31-
"symfony/property-info": "6.4.*",
32-
"symfony/runtime": "^6.4",
33-
"symfony/security-bundle": "6.4.*",
34-
"symfony/serializer": "6.4.*",
35-
"symfony/twig-bundle": "6.4.*",
36-
"symfony/validator": "6.4.*",
37-
"symfony/yaml": "6.4.*"
2+
"name": "qownnotes/api",
3+
"type": "project",
4+
"license": "AGPL-3.0-or-later",
5+
"require": {
6+
"php": ">=8.1",
7+
"ext-ctype": "*",
8+
"ext-dom": "*",
9+
"ext-iconv": "*",
10+
"ext-json": "*",
11+
"api-platform/core": "^3.3",
12+
"composer/package-versions-deprecated": "^1.11",
13+
"doctrine/annotations": "^1.0",
14+
"doctrine/cache": "^1.12",
15+
"doctrine/doctrine-bundle": "^2.1",
16+
"doctrine/doctrine-migrations-bundle": "^3.0",
17+
"doctrine/orm": "^2.7",
18+
"guzzlehttp/guzzle": "^7.5.0",
19+
"kevinrob/guzzle-cache-middleware": "^4.0 || ^5.0",
20+
"league/uri": "^6.3.0",
21+
"matomo/matomo-php-tracker": "^3.0",
22+
"michelf/php-markdown": "^1.9",
23+
"nelmio/cors-bundle": "^2.1",
24+
"symfony/asset": "6.4.*",
25+
"symfony/console": "6.4.*",
26+
"symfony/dotenv": "6.4.*",
27+
"symfony/expression-language": "6.4.*",
28+
"symfony/flex": "^1.3.1",
29+
"symfony/framework-bundle": "6.4.*",
30+
"symfony/property-access": "6.4.*",
31+
"symfony/property-info": "6.4.*",
32+
"symfony/runtime": "^6.4",
33+
"symfony/security-bundle": "6.4.*",
34+
"symfony/serializer": "6.4.*",
35+
"symfony/twig-bundle": "6.4.*",
36+
"symfony/validator": "6.4.*",
37+
"symfony/yaml": "6.4.*"
38+
},
39+
"require-dev": {
40+
"friendsofphp/php-cs-fixer": "^3.75",
41+
"justinrainbow/json-schema": "^6.0",
42+
"phpunit/phpunit": "^10.5",
43+
"symfony/browser-kit": "^6.4",
44+
"symfony/css-selector": "^6.4",
45+
"symfony/http-client": "6.4.*",
46+
"symfony/phpunit-bridge": "^7.0.4"
47+
},
48+
"config": {
49+
"platform": {
50+
"php": "8.2"
3851
},
39-
"require-dev": {
40-
"friendsofphp/php-cs-fixer": "^3.75",
41-
"justinrainbow/json-schema": "^6.0",
42-
"phpunit/phpunit": "^10.5",
43-
"symfony/browser-kit": "^6.4",
44-
"symfony/css-selector": "^6.4",
45-
"symfony/http-client": "6.4.*",
46-
"symfony/phpunit-bridge": "^7.0.4"
52+
"optimize-autoloader": true,
53+
"preferred-install": {
54+
"*": "dist"
4755
},
48-
"config": {
49-
"platform": {
50-
"php": "8.2"
51-
},
52-
"optimize-autoloader": true,
53-
"preferred-install": {
54-
"*": "dist"
55-
},
56-
"sort-packages": true,
57-
"allow-plugins": {
58-
"symfony/flex": true,
59-
"symfony/runtime": true
60-
}
61-
},
62-
"autoload": {
63-
"psr-4": {
64-
"App\\": "src/"
65-
}
66-
},
67-
"autoload-dev": {
68-
"psr-4": {
69-
"App\\Tests\\": "tests/"
70-
}
71-
},
72-
"replace": {
73-
"paragonie/random_compat": "2.*",
74-
"symfony/polyfill-ctype": "*",
75-
"symfony/polyfill-iconv": "*",
76-
"symfony/polyfill-php72": "*",
77-
"symfony/polyfill-php71": "*",
78-
"symfony/polyfill-php70": "*",
79-
"symfony/polyfill-php56": "*"
80-
},
81-
"scripts": {
82-
"auto-scripts": {
83-
"cache:clear": "symfony-cmd",
84-
"assets:install %PUBLIC_DIR%": "symfony-cmd"
85-
},
86-
"post-install-cmd": [
87-
"@auto-scripts"
88-
],
89-
"post-update-cmd": [
90-
"@auto-scripts"
91-
],
92-
"test": [
93-
"@php vendor/bin/phpunit"
94-
]
95-
},
96-
"conflict": {
97-
"symfony/symfony": "*"
56+
"sort-packages": true,
57+
"allow-plugins": {
58+
"symfony/flex": true,
59+
"symfony/runtime": true
60+
}
61+
},
62+
"autoload": {
63+
"psr-4": {
64+
"App\\": "src/"
65+
}
66+
},
67+
"autoload-dev": {
68+
"psr-4": {
69+
"App\\Tests\\": "tests/"
70+
}
71+
},
72+
"replace": {
73+
"paragonie/random_compat": "2.*",
74+
"symfony/polyfill-ctype": "*",
75+
"symfony/polyfill-iconv": "*",
76+
"symfony/polyfill-php72": "*",
77+
"symfony/polyfill-php71": "*",
78+
"symfony/polyfill-php70": "*",
79+
"symfony/polyfill-php56": "*"
80+
},
81+
"scripts": {
82+
"auto-scripts": {
83+
"cache:clear": "symfony-cmd",
84+
"assets:install %PUBLIC_DIR%": "symfony-cmd"
9885
},
99-
"extra": {
100-
"symfony": {
101-
"allow-contrib": false,
102-
"require": "6.4.*"
103-
}
86+
"post-install-cmd": [
87+
"@auto-scripts"
88+
],
89+
"post-update-cmd": [
90+
"@auto-scripts"
91+
],
92+
"test": [
93+
"@php vendor/bin/phpunit"
94+
]
95+
},
96+
"conflict": {
97+
"symfony/symfony": "*"
98+
},
99+
"extra": {
100+
"symfony": {
101+
"allow-contrib": false,
102+
"require": "6.4.*"
104103
}
104+
}
105105
}

0 commit comments

Comments
 (0)