Skip to content

Commit b710189

Browse files
committed
Initial commit
0 parents  commit b710189

28 files changed

+6184
-0
lines changed

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*.php text eol=lf
2+
/composer.lock export-ignore
3+
/.github/ export-ignore
4+
/docs export-ignore
5+
/tests export-ignore
6+
/tools/ export-ignore
7+
/.gitattributes export-ignore
8+
/.gitignore export-ignore
9+
/.php_cs export-ignore
10+
/phpstan.neon export-ignore
11+
/phpunit.xml export-ignore
12+
/psalm.xml export-ignore
13+
/infection.json export-ignore

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!-- Bellow section will be used to automatically generate changelog, please do not modify HTML code structure -->
2+
<h2>Change Log</h2>
3+
<div id="change-log">
4+
<h4>Added</h4>
5+
<ul id="added">
6+
<!-- <li>Feature making everything better</li> -->
7+
</ul>
8+
<h4>Fixed</h4>
9+
<ul id="fixed">
10+
<!-- <li>Behavior that was incorrect</li> -->
11+
</ul>
12+
<h4>Changed</h4>
13+
<ul id="changed">
14+
<!-- <li>Something into something new</li> -->
15+
</ul>
16+
<h4>Removed</h4>
17+
<ul id="removed">
18+
<!-- <li>Something</li> -->
19+
</ul>
20+
<h4>Deprecated</h4>
21+
<ul id="deprecated">
22+
<!-- <li>Something is from now deprecated</li> -->
23+
</ul>
24+
<h4>Security</h4>
25+
<ul id="security">
26+
<!-- <li>Something that was security issue, is not an issue anymore</li> -->
27+
</ul>
28+
</div>
29+
<hr/>
30+
31+
<h2>Description</h2>
32+
33+
<!-- Please provide a shore description of changes in this section, feel free to use markdown syntax -->

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "composer"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
- package-ecosystem: "composer"
8+
directory: "/tools"
9+
schedule:
10+
interval: "daily"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Changelog - Release Unreleased"
2+
3+
###################################################################
4+
# WARNING - THIS ACTION WILL PUSH COMMIT DIRECTLY INTO REPOSITORY #
5+
###################################################################
6+
7+
on:
8+
push:
9+
tags:
10+
- '*'
11+
12+
jobs:
13+
changelog-release-unreleased:
14+
name: "Update Changelog - Release Unreleased"
15+
16+
runs-on: "ubuntu-latest"
17+
18+
steps:
19+
- id: "tag-name"
20+
run: |
21+
tag=$(echo ${{ github.event.ref }} | cut -c11-)
22+
echo "::set-output name=tag::$tag"
23+
- name: "Update CHANGELOG"
24+
uses: "docker://aeonphp/automation:latest"
25+
env:
26+
AEON_AUTOMATION_GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
27+
with:
28+
entrypoint: "/composer/vendor/bin/automation"
29+
args: "changelog:release:unreleased ${{ github.repository }} CHANGELOG.md ${{ steps.tag-name.outputs.tag }} --github-file-changelog-update"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Changelog - Update Unreleased"
2+
3+
###################################################################
4+
# WARNING - THIS ACTION WILL PUSH COMMIT DIRECTLY INTO REPOSITORY #
5+
###################################################################
6+
7+
on:
8+
push:
9+
branches:
10+
- 1.x
11+
12+
jobs:
13+
changelog-update-unreleased:
14+
name: "Changelog - Update Unreleased"
15+
16+
runs-on: "ubuntu-latest"
17+
18+
steps:
19+
- name: "Checkout"
20+
uses: "actions/checkout@v2"
21+
22+
- name: "Restore Automation cache"
23+
uses: "actions/cache@v2"
24+
with:
25+
path: |
26+
cache
27+
key: "${{ runner.os }}-automation-${{ hashFiles('**/CHANGELOG.md') }}"
28+
restore-keys: |
29+
${{ runner.os }}-automation-
30+
31+
- name: "Update CHANGELOG"
32+
uses: "docker://aeonphp/automation:latest"
33+
env:
34+
AEON_AUTOMATION_GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
35+
EON_AUTOMATION_CACHE_DIR: "/github/workspace/cache"
36+
with:
37+
entrypoint: "/composer/vendor/bin/automation"
38+
args: "changelog:generate ${{ github.repository }} --github-file-update-path=CHANGELOG.md --skip-from=\"dependabot[bot]\" --skip-from=\"aeon-automation\""

.github/workflows/docs.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Documentation Linter"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "1.x"
8+
9+
jobs:
10+
documentation-linter:
11+
name: "Documentation Linter"
12+
13+
runs-on: "ubuntu-latest"
14+
15+
steps:
16+
- name: "Checkout"
17+
uses: "actions/checkout@v2"
18+
19+
- name: "MD Link Linter"
20+
uses: "docker://norberttech/md-link-linter:latest"
21+
with:
22+
entrypoint: "/composer/vendor/bin/mdlinklint"
23+
args: "--exclude=vendor --exclude=tests ."
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Pull Request Description Check"
2+
3+
on:
4+
pull_request:
5+
types: ["opened", "edited", "reopened", "ready_for_review"]
6+
7+
jobs:
8+
pull-request-description-check:
9+
name: "Pull Request Description"
10+
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- name: "Pull Request Description - Check"
15+
uses: "docker://aeonphp/automation:latest"
16+
env:
17+
AEON_AUTOMATION_GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
18+
with:
19+
entrypoint: "/composer/vendor/bin/automation"
20+
args: "pull-request:description:check ${{ github.repository }} ${{ github.event.pull_request.number }} --skip-from=\"dependabot[bot]\""
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "Release - Description Update"
2+
3+
#########################################################
4+
# WARNING - THIS ACTION WILL UPDATE RELEASE DESCRIPTION #
5+
#########################################################
6+
7+
on:
8+
release:
9+
types:
10+
- created
11+
12+
jobs:
13+
release-description-update:
14+
name: "Release - Description Update"
15+
16+
runs-on: "ubuntu-latest"
17+
18+
steps:
19+
- name: "Update CHANGELOG"
20+
uses: "docker://aeonphp/automation:latest"
21+
env:
22+
AEON_AUTOMATION_GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
23+
with:
24+
entrypoint: "/composer/vendor/bin/automation"
25+
args: "changelog:generate ${{ github.repository }} --tag=${{ github.event.release.tag_name }} --github-release-update --skip-from=\"dependabot[bot]\" --skip-from=\"aeon-automation\""
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: "Static Analyze"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "1.x"
8+
schedule:
9+
- cron: '* 8 * * *'
10+
11+
jobs:
12+
static-analyze:
13+
name: "Static Analyze"
14+
15+
runs-on: ${{ matrix.operating-system }}
16+
17+
strategy:
18+
matrix:
19+
dependencies:
20+
- "locked"
21+
php-version:
22+
- "7.4"
23+
operating-system:
24+
- "ubuntu-latest"
25+
26+
steps:
27+
- name: "Checkout"
28+
uses: "actions/checkout@v2"
29+
30+
- name: "Install PHP"
31+
uses: "shivammathur/setup-php@v2"
32+
with:
33+
coverage: pcov
34+
tools: composer:v2
35+
php-version: "${{ matrix.php-version }}"
36+
ini-values: memory_limit=-1
37+
38+
- name: "Get Composer Cache Directory"
39+
id: composer-cache
40+
run: |
41+
echo "::set-output name=dir::$(composer config cache-files-dir)"
42+
43+
- name: "Cache Composer dependencies"
44+
uses: "actions/cache@v2"
45+
with:
46+
path: |
47+
${{ steps.composer-cache.outputs.dir }}
48+
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.lock') }}"
49+
restore-keys: |
50+
php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-
51+
52+
- name: "Install lowest dependencies"
53+
if: ${{ matrix.dependencies == 'lowest' }}
54+
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
55+
56+
- name: "Install highest dependencies"
57+
if: ${{ matrix.dependencies == 'highest' }}
58+
run: "composer update --no-interaction --no-progress --no-suggest"
59+
60+
- name: "Install locked dependencies"
61+
if: ${{ matrix.dependencies == 'locked' }}
62+
run: "composer install --no-interaction --no-progress --no-suggest"
63+
64+
- name: "Install tools"
65+
run: "composer install --no-interaction --no-progress --no-suggest"
66+
working-directory: "./tools"
67+
68+
- name: "Static Analyze"
69+
run: "composer static:analyze"

.github/workflows/tests.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: "Tests"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "1.x"
8+
schedule:
9+
- cron: '* 8 * * *'
10+
11+
jobs:
12+
tests:
13+
name: "Tests"
14+
15+
runs-on: ${{ matrix.operating-system }}
16+
17+
services:
18+
elasticsearch:
19+
image: elasticsearch:7.12.0
20+
env:
21+
discovery.type: single-node
22+
options: >-
23+
--health-cmd "curl http://localhost:9200/_cluster/health"
24+
--health-interval 10s
25+
--health-timeout 5s
26+
--health-retries 10
27+
ports:
28+
- 9200:9200
29+
30+
strategy:
31+
matrix:
32+
dependencies:
33+
- "locked"
34+
- "lowest"
35+
- "highest"
36+
php-version:
37+
- "7.4"
38+
operating-system:
39+
- "ubuntu-latest"
40+
- "windows-latest"
41+
42+
steps:
43+
- name: "Checkout"
44+
uses: "actions/checkout@v2"
45+
46+
- name: "Install PHP"
47+
uses: "shivammathur/setup-php@v2"
48+
with:
49+
coverage: pcov
50+
tools: composer:v2
51+
php-version: "${{ matrix.php-version }}"
52+
ini-values: memory_limit=-1
53+
54+
- name: "Get Composer Cache Directory"
55+
id: composer-cache
56+
run: |
57+
echo "::set-output name=dir::$(composer config cache-files-dir)"
58+
59+
- name: "Cache Composer dependencies"
60+
uses: "actions/cache@v2"
61+
with:
62+
path: |
63+
${{ steps.composer-cache.outputs.dir }}
64+
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.lock') }}"
65+
restore-keys: |
66+
php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-
67+
68+
- name: "Install lowest dependencies"
69+
if: ${{ matrix.dependencies == 'lowest' }}
70+
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
71+
72+
- name: "Install highest dependencies"
73+
if: ${{ matrix.dependencies == 'highest' }}
74+
run: "composer update --no-interaction --no-progress --no-suggest"
75+
76+
- name: "Install locked dependencies"
77+
if: ${{ matrix.dependencies == 'locked' }}
78+
run: "composer install --no-interaction --no-progress --no-suggest"
79+
80+
- name: "Install tools"
81+
run: "composer install --no-interaction --no-progress --no-suggest"
82+
working-directory: "./tools"
83+
84+
- name: "Test"
85+
run: "composer test"

0 commit comments

Comments
 (0)