Skip to content

Commit 81ed873

Browse files
authored
Merge pull request #4 from asanikovich/1.x
1.0 init
2 parents bbef398 + 702b654 commit 81ed873

Some content is hidden

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

65 files changed

+5223
-1
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ trim_trailing_whitespace = false
1313

1414
[*.{yml,yaml}]
1515
indent_size = 2
16+
17+
[phpstan.neon]
18+
indent_size = 2

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Bug Report
2+
description: Report an Issue or Bug with the Package
3+
title: "[Bug]: "
4+
labels: [ "bug" ]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: What did you expect to happen?
15+
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: how-to-reproduce
20+
attributes:
21+
label: How to reproduce the bug
22+
description: How did this occur, please add any config values used and provide a set of reliable steps if possible.
23+
placeholder: When I do X I see Y.
24+
validations:
25+
required: true
26+
- type: input
27+
id: package-version
28+
attributes:
29+
label: Package Version
30+
description: What version of our Package are you running? Please be as specific as possible
31+
placeholder: 2.0.0
32+
validations:
33+
required: true
34+
- type: input
35+
id: php-version
36+
attributes:
37+
label: PHP Version
38+
description: What version of PHP are you running? Please be as specific as possible
39+
placeholder: 8.2.0
40+
validations:
41+
required: true
42+
- type: input
43+
id: laravel-version
44+
attributes:
45+
label: Laravel Version
46+
description: What version of Laravel are you running? Please be as specific as possible
47+
placeholder: 9.0.0
48+
validations:
49+
required: true
50+
- type: dropdown
51+
id: db
52+
attributes:
53+
label: Which database does with happen with?
54+
options:
55+
- MySql
56+
- Mariadb
57+
- type: input
58+
id: db-version
59+
attributes:
60+
label: Database Version
61+
description: What version of Database are you running? Please be as specific as possible
62+
placeholder: '8.0'
63+
validations:
64+
required: true
65+
- type: dropdown
66+
id: operating-systems
67+
attributes:
68+
label: Which operating systems does with happen with?
69+
description: You may select more than one.
70+
multiple: true
71+
options:
72+
- macOS
73+
- Windows
74+
- Linux
75+
- type: textarea
76+
id: notes
77+
attributes:
78+
label: Notes
79+
description: Use this field to provide any other notes that you feel might be relevant to the issue.
80+
validations:
81+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a question
4+
url: https://github.com/asanikovich/laravel-spatial/discussions/new?category=q-a
5+
about: Ask the community for help
6+
- name: Request a feature
7+
url: https://github.com/asanikovich/laravel-spatial/discussions/new?category=ideas
8+
about: Share ideas for new features
9+
- name: Report a security issue
10+
url: https://github.com/asanikovich/laravel-spatial/security/policy
11+
about: Learn how to notify us for sensitive bugs

.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: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Tests coverage
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
test:
7+
name: Pest - coverage
8+
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
db:
13+
image: mysql:8.0
14+
env:
15+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
16+
MYSQL_DATABASE: laravel
17+
ports:
18+
- 3306
19+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: 8.2
29+
coverage: xdebug
30+
31+
- name: Install dependencies
32+
run: composer install --prefer-dist --no-interaction
33+
34+
- name: Execute tests
35+
env:
36+
DB_PORT: ${{ job.services.db.ports['3306'] }}
37+
run: XDEBUG_MODE=coverage ./vendor/bin/pest --coverage --min=100 --coverage-clover coverage.xml
38+
39+
- name: Upload coverage reports to Codecov
40+
uses: codecov/codecov-action@v3
41+
env:
42+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/pest.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Tests
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
test:
7+
name: Pest PHP${{ matrix.php }} Laravel ${{ matrix.laravel }} ${{ matrix.db }} ${{ matrix.dependency-version }}
8+
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
php: [ 8.2, 8.1 ]
15+
laravel: [ 9.*, 8.* ]
16+
db: [ 'mysql:8.0', 'mysql:5.7', 'mariadb:10.9' ]
17+
dependency-version: [ prefer-stable ]
18+
include:
19+
- laravel: 9.*
20+
testbench: ^7.0
21+
- laravel: 8.*
22+
testbench: ^6.23
23+
24+
services:
25+
db:
26+
image: ${{ matrix.db }}
27+
env:
28+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
29+
MYSQL_DATABASE: laravel
30+
ports:
31+
- 3306
32+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
33+
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v2
37+
38+
- name: Setup PHP
39+
uses: shivammathur/setup-php@v2
40+
with:
41+
php-version: ${{ matrix.php }}
42+
coverage: none
43+
44+
- name: Install dependencies
45+
run: |
46+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
47+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
48+
49+
- name: Execute tests
50+
env:
51+
DB_PORT: ${{ job.services.db.ports['3306'] }}
52+
run: vendor/bin/pest

.github/workflows/phpstan.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Static code analysis
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
phpstan:
7+
name: PHPStan
8+
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
php: [ 8.2, 8.1 ]
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php }}
24+
coverage: none
25+
26+
- name: Install dependencies
27+
run: composer install --prefer-dist --no-interaction
28+
29+
- name: Run PHPStan
30+
run: ./vendor/bin/phpstan analyse --memory-limit=2G --error-format=github

.github/workflows/pint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Fix PHP code style issues
2+
3+
on:
4+
push:
5+
paths:
6+
- "**.php"
7+
pull_request:
8+
branches: [master]
9+
10+
jobs:
11+
php-code-styling:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
with:
18+
ref: ${{ github.head_ref }}
19+
20+
- name: Fix PHP code style issues
21+
uses: aglipanci/[email protected]
22+
23+
- name: Commit changes
24+
uses: stefanzweifel/git-auto-commit-action@v4
25+
with:
26+
commit_message: Fix styling
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Update Changelog
2+
3+
on:
4+
release:
5+
types: [ released ]
6+
7+
jobs:
8+
update:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
with:
15+
ref: master
16+
17+
- name: Update Changelog
18+
uses: stefanzweifel/changelog-updater-action@v1
19+
with:
20+
latest-version: ${{ github.event.release.name }}
21+
release-notes: ${{ github.event.release.body }}
22+
23+
- name: Commit updated CHANGELOG
24+
uses: stefanzweifel/git-auto-commit-action@v4
25+
with:
26+
branch: master
27+
commit_message: Update CHANGELOG
28+
file_pattern: CHANGELOG.md

0 commit comments

Comments
 (0)