Skip to content

Commit 98162f5

Browse files
committed
Monitor v0.1.0
0 parents  commit 98162f5

File tree

73 files changed

+7968
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+7968
-0
lines changed

.githooks/pre-commit

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# Grab the commit message in-progress
4+
COMMIT_MSG_FILE="$(git rev-parse --git-path COMMIT_EDITMSG)"
5+
6+
# Check for a NO_VERIFY tag in the message (case-insensitive)
7+
if grep -qi '\[no-verify\]' "$COMMIT_MSG_FILE"; then
8+
echo "⚠️ Detected [no-verify] tag in commit message. Skipping preflight."
9+
exit 0
10+
fi
11+
12+
scripts/preflight.sh
13+
status=$?
14+
15+
if [[ $status -ne 0 ]]; then
16+
echo ""
17+
echo "🚫 Commit aborted due to preflight check failures."
18+
echo " To bypass, add '[no-verify]' to your commit message."
19+
echo " Example: git commit -m 'Fix X [no-verify]'"
20+
exit $status
21+
fi
22+
23+
echo ""
24+
echo "✅ Preflight passed. Proceeding with commit."
25+
exit 0

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Please see the documentation for all configuration options:
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
labels:
12+
- "dependencies"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: dependabot-auto-merge
2+
on: pull_request_target
3+
4+
permissions:
5+
pull-requests: write
6+
contents: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 5
12+
if: ${{ github.actor == 'dependabot[bot]' }}
13+
steps:
14+
15+
- name: Dependabot metadata
16+
id: metadata
17+
uses: dependabot/[email protected]
18+
with:
19+
github-token: "${{ secrets.GITHUB_TOKEN }}"
20+
21+
- name: Auto-merge Dependabot PRs for semver-minor updates
22+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
23+
run: gh pr merge --auto --merge "$PR_URL"
24+
env:
25+
PR_URL: ${{github.event.pull_request.html_url}}
26+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
27+
28+
- name: Auto-merge Dependabot PRs for semver-patch updates
29+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
30+
run: gh pr merge --auto --merge "$PR_URL"
31+
env:
32+
PR_URL: ${{github.event.pull_request.html_url}}
33+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Update Changelog"
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
update:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
ref: main
20+
21+
- name: Update Changelog
22+
uses: stefanzweifel/changelog-updater-action@v1
23+
with:
24+
latest-version: ${{ github.event.release.name }}
25+
release-notes: ${{ github.event.release.body }}
26+
27+
- name: Commit updated CHANGELOG
28+
uses: stefanzweifel/git-auto-commit-action@v5
29+
with:
30+
branch: main
31+
commit_message: Update CHANGELOG
32+
file_pattern: CHANGELOG.md

.github/workflows/php-tests.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: PHP Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
os: [ubuntu-latest]
16+
php: [8.3, 8.4]
17+
laravel: [11.*, 12.*]
18+
stability: [prefer-lowest, prefer-stable]
19+
include:
20+
- laravel: 11.*
21+
testbench: ^9.9
22+
carbon: ^2.63
23+
- laravel: 12.*
24+
testbench: 10.*
25+
carbon: ^2.63|^3.0
26+
27+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
33+
- name: Setup PHP
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: ${{ matrix.php }}
37+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, swoole, openssl
38+
coverage: pcov
39+
40+
- name: Setup problem matchers
41+
run: |
42+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
43+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
44+
45+
- name: Install dependencies
46+
run: |
47+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
48+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
49+
50+
- name: List Installed Dependencies
51+
run: composer show -D
52+
53+
- name: Execute tests
54+
run: vendor/bin/pest --ci --bail --compact --memory --coverage
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Static Analysis
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- 'composer.lock'
8+
- 'phpstan.neon.dist'
9+
- '.github/workflows/phpstan.yml'
10+
11+
jobs:
12+
phpstan:
13+
name: phpstan
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 5
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: '8.4'
23+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, swoole, openssl
24+
coverage: none
25+
26+
- name: Install composer dependencies
27+
uses: ramsey/composer-install@v3
28+
29+
- name: Run PHPStan
30+
run: ./vendor/bin/phpstan --error-format=github

.github/workflows/style-check.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Code Style
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches-ignore:
7+
- 'dependabot/npm_and_yarn/*'
8+
9+
jobs:
10+
Pint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Setup PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: 8.3
18+
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Copy .env
23+
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
24+
25+
- name: Install Dependencies
26+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
27+
28+
- name: Launch Pint inspection
29+
run: vendor/bin/pint --test

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
vendor
2+
composer.lock
3+
node_modules
4+
build
5+
.pint.cache
6+
.idea
7+
.DS_Store
8+
.env
9+
*.log
10+
.env.backup
11+
.env.production
12+
.phpactor.json
13+
.phpunit.result.cache
14+
/.fleet
15+
/.nova
16+
/.phpunit.cache
17+
/.vscode
18+
/.zed
19+
/auth.json
20+
/public/build
21+
/public/hot
22+
/public/storage
23+
/storage/*.key
24+
/storage/pail
25+
/tests/coverage
26+
Homestead.json
27+
Homestead.yaml
28+
npm-debug.log
29+
Thumbs.db
30+
yarn-error.log

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.

LICENCE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) Kirschbaum Development Group
4+
5+
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:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
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.

0 commit comments

Comments
 (0)