Skip to content

Commit 3ac5442

Browse files
Koldo Picazakpicaza
authored andcommitted
add github actions
1 parent a6835df commit 3ac5442

File tree

9 files changed

+251
-5
lines changed

9 files changed

+251
-5
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: kpicaza
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: kpicaza
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Additional context**
27+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: question
6+
assignees: kpicaza
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "composer" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Check Coding Standards"
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- "0.0.x"
10+
11+
jobs:
12+
coding-standards:
13+
name: "Check Coding Standards"
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+
php-version: "${{ matrix.php-version }}"
35+
ini-values: memory_limit=-1
36+
37+
- name: "Cache dependencies"
38+
uses: "actions/cache@v2"
39+
with:
40+
path: |
41+
~/.composer/cache
42+
vendor
43+
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
44+
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
45+
46+
- name: "Install lowest dependencies"
47+
if: ${{ matrix.dependencies == 'lowest' }}
48+
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
49+
50+
- name: "Install highest dependencies"
51+
if: ${{ matrix.dependencies == 'highest' }}
52+
run: "composer update --no-interaction --no-progress --no-suggest"
53+
54+
- name: "Install locked dependencies"
55+
if: ${{ matrix.dependencies == 'locked' }}
56+
run: "composer install --no-interaction --no-progress --no-suggest"
57+
58+
- name: "Coding Standard"
59+
run: "vendor/bin/phpcs"

.github/workflows/phpunit.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "PHPUnit tests"
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- "0.0.x"
10+
11+
jobs:
12+
phpunit:
13+
name: "PHPUnit tests"
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+
php-version: "${{ matrix.php-version }}"
35+
ini-values: memory_limit=-1
36+
37+
- name: "Cache dependencies"
38+
uses: "actions/cache@v2"
39+
with:
40+
path: |
41+
~/.composer/cache
42+
vendor
43+
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
44+
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
45+
46+
- name: "Install lowest dependencies"
47+
if: ${{ matrix.dependencies == 'lowest' }}
48+
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
49+
50+
- name: "Install highest dependencies"
51+
if: ${{ matrix.dependencies == 'highest' }}
52+
run: "composer update --no-interaction --no-progress --no-suggest"
53+
54+
- name: "Install locked dependencies"
55+
if: ${{ matrix.dependencies == 'locked' }}
56+
run: "composer install --no-interaction --no-progress --no-suggest"
57+
58+
- name: "Tests"
59+
run: "vendor/bin/phpunit"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Automatic Releases"
4+
5+
on:
6+
milestone:
7+
types:
8+
- "closed"
9+
10+
jobs:
11+
release:
12+
name: "GIT tag, release & create merge-up PR"
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: "Checkout"
17+
uses: "actions/checkout@v2"
18+
19+
- name: "Release"
20+
uses: "laminas/automatic-releases@v1"
21+
with:
22+
command-name: "laminas:automatic-releases:release"
23+
env:
24+
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
25+
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
26+
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
27+
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
28+
29+
- name: "Create Merge-Up Pull Request"
30+
uses: "laminas/automatic-releases@v1"
31+
with:
32+
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
33+
env:
34+
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
35+
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
36+
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
37+
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
38+
39+
- name: "Create and/or Switch to new Release Branch"
40+
uses: "laminas/automatic-releases@v1"
41+
with:
42+
command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
43+
env:
44+
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
45+
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
46+
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
47+
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
48+
49+
- name: "Bump Changelog Version On Originating Release Branch"
50+
uses: "laminas/automatic-releases@v1"
51+
with:
52+
command-name: "laminas:automatic-releases:bump-changelog"
53+
env:
54+
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
55+
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
56+
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
57+
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
58+
59+
- name: "Create new milestones"
60+
uses: "laminas/automatic-releases@v1"
61+
with:
62+
command-name: "laminas:automatic-releases:create-milestones"
63+
env:
64+
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
65+
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
66+
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
67+
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
"antidot-fw/symfony-config-translator": "^1.1.0",
3030
"antidot-fw/yaml-config-provider": "^0.1.0",
3131
"webmozart/assert": "^1.7.0",
32-
"wshafer/psr11-monolog": "^3.0.0"
32+
"wshafer/psr11-monolog": "^3.0.0|@dev"
3333
},
3434
"require-dev": {
3535
"blackfire/php-sdk": "^1.20",
3636
"franzl/whoops-middleware": "^1.1",
37-
"phpro/grumphp": "0.17.2",
37+
"phpro/grumphp": "^1.0",
3838
"phpstan/phpstan": "^0.11.5",
3939
"phpunit/phpunit": "^8.0",
4040
"roave/security-advisories": "dev-master",

grumphp.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
parameters:
2-
git_dir: .
3-
bin_dir: vendor/bin
1+
grumphp:
2+
hooks_dir: .
3+
hooks_preset: local
44
tasks:
55
composer_script:
66
script: check-all

0 commit comments

Comments
 (0)