-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
24 changed files
with
5,194 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# https://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.yml] | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# SPDX-FileCopyrightText: 2024 LibreCode coop and contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
github: libresign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# SPDX-FileCopyrightText: 2020-2024 LibreCode coop and contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
# Comment to be posted to on PRs from first time contributors in your repository | ||
newPRWelcomeComment: "Thanks for opening your first pull request in this repository! :v:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SPDX-FileCopyrightText: 2020-2024 LibreCode coop and contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
version: 2 | ||
updates: | ||
# Maintain dependencies for Composer | ||
- package-ecosystem: "composer" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
# | ||
# SPDX-FileCopyrightText: 2024 LibreCode coop and contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
name: Lint php-cs | ||
|
||
on: pull_request | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: lint-php-cs-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
name: php-cs | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Set up php | ||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 | ||
with: | ||
php-version: 8.3 | ||
coverage: none | ||
ini-file: development | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: composer i | ||
|
||
- name: Lint | ||
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
# | ||
# SPDX-FileCopyrightText: 2024 LibreCode coop and contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
name: Lint php | ||
|
||
on: pull_request | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: lint-php-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
php-versions: ${{ steps.versions.outputs.php-versions }} | ||
steps: | ||
- name: Checkout app | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
php-lint: | ||
runs-on: ubuntu-latest | ||
needs: matrix | ||
|
||
name: php-lint | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Set up php | ||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 | ||
with: | ||
php-version: 8.3 | ||
coverage: none | ||
ini-file: development | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Lint | ||
run: composer run lint | ||
|
||
summary: | ||
permissions: | ||
contents: none | ||
runs-on: ubuntu-latest | ||
needs: php-lint | ||
|
||
if: always() | ||
|
||
name: php-lint-summary | ||
|
||
steps: | ||
- name: Summary status | ||
run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
# | ||
# SPDX-FileCopyrightText: 2024 LibreCode coop and contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
name: Static analysis | ||
|
||
on: pull_request | ||
|
||
concurrency: | ||
group: psalm-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
static-analysis: | ||
runs-on: ubuntu-latest | ||
|
||
name: static-psalm-analysis | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Set up php | ||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 | ||
with: | ||
php-version: 8.3 | ||
coverage: none | ||
ini-file: development | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: composer i | ||
|
||
- name: Run coding standards check | ||
run: composer run psalm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# SPDX-FileCopyrightText: 2024 LibreCode coop and contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
name: Build and publish phar | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check actor permission | ||
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0 | ||
with: | ||
require: write | ||
|
||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Setup PHP with tools | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.3' | ||
tools: box | ||
|
||
- name: Box | ||
run: box compile | ||
|
||
- name: Attach tarball to github release | ||
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 | ||
id: attach_to_release | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: spdx.phar | ||
asset_name: spdx.phar | ||
tag: ${{ github.ref }} | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
|
||
# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. <https://fsfe.org> | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
name: REUSE Compliance Check | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
reuse-compliance-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | ||
|
||
- name: REUSE Compliance Check | ||
uses: fsfe/reuse-action@3ae3c6bdf1257ab19397fab11fd3312144692083 # v4.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vendor | ||
.php-cs-fixer.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Vitor Mattos <[email protected]> | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
require_once './vendor/autoload.php'; | ||
|
||
use PhpCsFixer\Config; | ||
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory; | ||
|
||
$config = new Config(); | ||
$config | ||
->setParallelConfig(ParallelConfigFactory::detect()) | ||
->getFinder() | ||
->ignoreVCSIgnored(true) | ||
->notPath('vendor') | ||
->in(__DIR__); | ||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- | ||
- SPDX-FileCopyrightText: 2024 LibreCode coop and contributors | ||
- SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
# Authors | ||
|
||
- Vitor Mattos <[email protected]> |
Oops, something went wrong.