-
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.
- Loading branch information
0 parents
commit d7757ff
Showing
46 changed files
with
16,684 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 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
[docker-compose.yml] | ||
indent_size = 4 |
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,11 @@ | ||
* text=auto | ||
|
||
/.github export-ignore | ||
/tests export-ignore | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
phpstan.neon export-ignore | ||
phpunit.xml export-ignore | ||
pint.json export-ignore | ||
testbench.yaml export-ignore |
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 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "composer" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- "yourivw" | ||
labels: | ||
- "changelog:maintenance" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
reviewers: | ||
- "yourivw" | ||
labels: | ||
- "changelog:maintenance" |
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,43 @@ | ||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
categories: | ||
- title: Added | ||
labels: | ||
- 'changelog:added' | ||
- title: Changed | ||
labels: | ||
- 'changelog:changed' | ||
- title: Deprecated | ||
labels: | ||
- 'changelog:deprecated' | ||
- title: Removed | ||
labels: | ||
- 'changelog:removed' | ||
- title: Fixed | ||
labels: | ||
- 'changelog:fixed' | ||
- title: Security | ||
labels: | ||
- 'changelog:security' | ||
- title: 'Maintenance & updates' | ||
labels: | ||
- 'changelog:maintenance' | ||
change-template: '- $TITLE @$AUTHOR ([#$NUMBER](https://github.com/yourivw/sailor/pull/$NUMBER))' | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'changelog:removed' | ||
minor: | ||
labels: | ||
- 'changelog:added' | ||
- 'changelog:deprecated' | ||
patch: | ||
labels: | ||
- 'changelog:fixed' | ||
- 'changelog:security' | ||
- 'changelog:maintenance' | ||
default: patch | ||
template: | | ||
$CHANGES | ||
exclude-labels: | ||
- 'changelog:ignore' |
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,50 @@ | ||
name: Analyse code coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- src/**/*.php | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
coverage: | ||
name: Analyse code coverage | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.3 | ||
tools: composer:v2 | ||
|
||
- name: Run composer install | ||
run: | | ||
composer require "laravel/framework:11.*" --no-interaction --no-update | ||
composer install --prefer-dist --no-interaction | ||
- name: Run PHPUnit tests with coverage | ||
run: ./vendor/bin/phpunit --coverage-clover clover.xml | ||
|
||
- name: Generate test coverage badge | ||
uses: timkrase/phpunit-coverage-badge@v1.2.1 | ||
with: | ||
coverage_badge_path: 'output/badge-coverage.svg' | ||
push_badge: false | ||
|
||
- name: Git push badge to image-data branch | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
publish_dir: ./output | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
user_name: 'github-actions[bot]' | ||
user_email: 'github-actions[bot]@users.noreply.github.com' |
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,26 @@ | ||
name: Dependabot auto merge | ||
|
||
on: pull_request_target | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
dependabot: | ||
name: Dependabot auto merge | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- name: Get Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v2.0.0 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Merge Dependabot PR's for patch and minor updates | ||
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }} | ||
run: gh pr merge --auto --merge "$PR_URL" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,31 @@ | ||
name: Pint formatting | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- src/**/*.php | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
pint: | ||
name: Pint formatting | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run formatting | ||
uses: aglipanci/laravel-pint-action@2.4 | ||
with: | ||
configPath: pint.json | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
commit_message: 'Pint formatting 🍻' |
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,24 @@ | ||
name: Draft release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: read | ||
|
||
jobs: | ||
draft_release: | ||
name: Draft release | ||
if: github.actor != 'github-actions[bot]' && github.actor != 'dependabot[bot]' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Draft release changes | ||
uses: release-drafter/release-drafter@v6 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,44 @@ | ||
name: Publish release | ||
|
||
on: workflow_dispatch | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: Publish release | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Get draft release | ||
uses: cardinalby/git-get-release-action@v1 | ||
id: get_draft_release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
latest: true | ||
draft: true | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update changelog | ||
uses: stefanzweifel/changelog-updater-action@v1 | ||
with: | ||
release-notes: ${{ steps.get_draft_release.outputs.body }} | ||
latest-version: ${{ steps.get_draft_release.outputs.name }} | ||
|
||
- name: Commit updated changelog | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Update CHANGELOG.md | ||
file_pattern: CHANGELOG.md | ||
|
||
- name: Publish release | ||
uses: eregon/publish-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
release_id: ${{ steps.get_draft_release.outputs.id }} |
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,52 @@ | ||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- '[0-9]+.**' | ||
paths: | ||
- src/**/*.php | ||
- composer.json | ||
- .github/workflows/** | ||
pull_request: | ||
paths: | ||
- src/**/*.php | ||
- composer.json | ||
- .github/workflows/** | ||
|
||
jobs: | ||
tests: | ||
name: Run tests on PHP ${{ matrix.php }} and Laravel ${{ matrix.laravel }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [8.3, 8.2, 8.1] | ||
laravel: [11.*, 10.*] | ||
exclude: | ||
- laravel: 11.* | ||
php: 8.1 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
tools: composer:v2 | ||
|
||
- name: Run composer install | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update | ||
composer install --prefer-dist --no-interaction | ||
- name: Run PHPUnit tests | ||
run: ./vendor/bin/phpunit | ||
|
||
- name: Run static analysis | ||
run: ./vendor/bin/phpstan --error-format=github |
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 @@ | ||
/.vscode | ||
/coverage | ||
/vendor | ||
/workbench | ||
composer.lock | ||
docker-compose.yml | ||
.phpunit.result.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,12 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased](https://github.com/yourivw/sailor/compare/v1.0.0...HEAD) | ||
|
||
## [v1.0.0](https://github.com/yourivw/sailor/releases/tag/v1.0.0) - 2024-04-01 | ||
|
||
- Initial release |
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,9 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) Youri van Weegberg | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.