Skip to content

Commit eb152c8

Browse files
authored
Merge pull request #4 from wayofdev/feat/updates
2 parents 4576756 + c6a79c9 commit eb152c8

File tree

8 files changed

+298
-271
lines changed

8 files changed

+298
-271
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
---
2+
13
# This workflow will triage pull requests and apply a label based on the
24
# paths that are modified in the pull request.
35
#
46
# To use this workflow, you will need to set up a .github/labeler.yml
5-
# file with configuration. For more information, see:
7+
# file with configuration. For more information, see:
68
# https://github.com/actions/labeler/blob/master/README.md
79

810
on: # yamllint disable-line rule:truthy
@@ -12,11 +14,10 @@ name: 🏷️ Add labels
1214

1315
jobs:
1416
label:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: 🏷️ Apply labels
18-
uses: actions/labeler@v4
19-
with:
20-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
17+
uses: wayofdev/gh-actions/.github/workflows/apply-labels.yml@master
18+
with:
19+
os: ubuntu-latest
20+
secrets:
21+
token: ${{ secrets.GITHUB_TOKEN }}
2122

2223
...

.github/workflows/auto-merge-release.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ name: 🤞 Auto merge release
1313

1414
jobs:
1515
auto-merge:
16-
if: github.actor == 'lotyp' && startsWith(github.head_ref, 'release-please--')
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: 🤞 Auto-merge pull request
20-
uses: peter-evans/enable-pull-request-automerge@v3
21-
with:
22-
pull-request-number: ${{ github.event.pull_request.number }}
23-
merge-method: merge
24-
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN
25-
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
16+
uses: wayofdev/gh-actions/.github/workflows/auto-merge-release.yml@master
17+
with:
18+
os: ubuntu-latest
19+
pull-request-number: ${{ github.event.pull_request.number }}
20+
actor: lotyp
21+
merge-method: merge
22+
secrets:
23+
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN
24+
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
2625

2726
...

.github/workflows/ci.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
matrix:
1919
os: ["ubuntu-22.04"]
2020
php: ["8.1", "8.2"]
21-
2221
steps:
2322
- name: 📦 Check out the codebase
2423
uses: actions/checkout@v3
@@ -27,7 +26,7 @@ jobs:
2726
uses: shivammathur/setup-php@v2
2827
with:
2928
php-version: ${{ matrix.php }}
30-
extensions: dom, curl, libxml, mbstring, zip, fileinfo
29+
extensions: curl, mbstring, zip, fileinfo
3130
ini-values: error_reporting=E_ALL
3231
tools: composer:v2
3332
coverage: none
@@ -37,19 +36,27 @@ jobs:
3736
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
3837
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
3938
40-
- name: ♻️ Load cached dependencies
39+
- name: ♻️ Restore cached dependencies
4140
id: cached-composer-dependencies
4241
uses: actions/cache@v3
4342
with:
4443
path: vendor
45-
key: vendor-${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
44+
key: vendor-${{ runner.os }}-${{ hashFiles('**/composer.lock') }}-${{ matrix.php }}
4645

4746
- name: 📥 Install dependencies
4847
if: steps.cached-composer-dependencies.outputs.cache-hit != 'true'
4948
run: composer install
5049

50+
- name: 🛠️ Prepare environment
51+
run: |
52+
mkdir -p ./.build/php-cs-fixer
53+
mkdir -p ./.build/phpstan
54+
mkdir -p ./.build/phpunit
55+
5156
- name: 🚨 Run coding standards task
5257
run: make cs-diff
58+
env:
59+
PHP_CS_FIXER_IGNORE_ENV: true
5360

5461
- name: 🧪 Execute phpunit and pest tests
5562
run: make test
@@ -59,4 +66,11 @@ jobs:
5966
env:
6067
PHPSTAN_OUTPUT_FORMAT: github
6168

69+
- name: 📤 Upload coverage report to Codecov
70+
uses: codecov/codecov-action@v3
71+
with:
72+
token: ${{ secrets.CODECOV_TOKEN }}
73+
files: ./coverage.xml
74+
verbose: true
75+
6276
...
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
3+
# This workflow was added by CodeSee. Learn more at https://codesee.io/
4+
# This is v2.0 of this workflow file
5+
6+
on: # yamllint disable-line rule:truthy
7+
push:
8+
branches:
9+
- develop
10+
pull_request_target:
11+
types:
12+
- opened
13+
- synchronize
14+
- reopened
15+
16+
name: 🤖 CodeSee
17+
18+
permissions: read-all
19+
20+
jobs:
21+
codesee:
22+
uses: wayofdev/gh-actions/.github/workflows/create-arch-diagram.yml@master
23+
with:
24+
os: ubuntu-latest
25+
continue-on-error: true
26+
secrets:
27+
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
28+
29+
...
Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,23 @@
11
---
22

3+
# https://github.com/wayofdev/gh-actions/blob/master/.github/workflows/create-release.yml
34
# https://github.com/google-github-actions/release-please-action#release-types-supported
45

56
on: # yamllint disable-line rule:truthy
67
push:
78
branches:
89
- master
910

10-
name: release-please
11+
name: 📦 Create release
1112

1213
jobs:
13-
release-please:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: google-github-actions/release-please-action@v3
17-
id: release
18-
with:
19-
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
20-
release-type: node
21-
package-name: laravel-package-tpl
22-
default-branch: master
23-
changelog-types: |
24-
[
25-
{ "type": "feat", "section": "Features", "hidden": false },
26-
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
27-
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
28-
{ "type": "docs", "section": "Documentation", "hidden": false },
29-
{ "type": "chore", "section": "Miscellaneous", "hidden": false },
30-
{ "type": "style", "section": "Styles", "hidden": true },
31-
{ "type": "revert", "section": "Reverts", "hidden": true },
32-
{ "type": "deps", "section": "Dependencies", "hidden": true },
33-
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
34-
{ "type": "test", "section": "Tests", "hidden": true },
35-
{ "type": "build", "section": "Build System", "hidden": true },
36-
{ "type": "ci", "section": "Continuous Integration", "hidden": true }
37-
]
14+
release:
15+
uses: wayofdev/gh-actions/.github/workflows/create-release.yml@master
16+
with:
17+
os: ubuntu-latest
18+
branch: master
19+
package-name: laravel-cycle-event-sourcing
20+
secrets:
21+
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
3822

3923
...

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ test-cc: ## Run project php-unit and pest tests in coverage mode and build repor
9393

9494
# Yaml Actions
9595
# ------------------------------------------------------------------------------------
96-
lint: ## Lints yaml files inside project
96+
lint-yaml: ## Lints yaml files inside project
9797
yamllint .
9898
.PHONY: lint
9999

0 commit comments

Comments
 (0)