Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/composer/laravel-infrastructure…
Browse files Browse the repository at this point in the history
…/master/mortexa/laravel-arkitect-tw-0.4or-tw-0.6
  • Loading branch information
abenevaut authored Nov 2, 2023
2 parents 2c5f72d + 815c7dc commit 009bd97
Show file tree
Hide file tree
Showing 88 changed files with 6,084 additions and 2,786 deletions.
2 changes: 2 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ Be free to contribute (or fork) this project.

All inspired code or re-used code have to be licensed to GNU GPLv3.
Please, take care about licensed projects you can't re-use.

The [abenevaut/opensource documentation](https://github.com/abenevaut/opensource/wiki), "the wiki", is open-sourced software licensed under the [CC BY-NC-SA 4.0 license](https://creativecommons.org/licenses/by-nc-sa/4.0/).
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1. Maintainers have the last word to merge or refuse PRs.
2. All contributions have to pass all CI tests to be merged.
3. All PRs have to follow the [conventional commits v1.0.x](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)
3. All PRs have to follow the [conventional commits v1.0.x](https://www.conventionalcommits.org/en/v1.0.0/)
- Following the conventional commits scopes
- github to add or modify files inside `.github/`
- `<PROJECT_NAME>` in case you make changes in a project
9 changes: 5 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ updates:
labels:
- dependencies
- dep:php

- package-ecosystem: composer
directory: "laravel-ohdear"
directory: "laravel-infrastructure"
schedule:
interval: monthly
time: "06:00"
Expand All @@ -25,7 +26,7 @@ updates:
- dep:php

- package-ecosystem: composer
directory: "laravel-sentry-handler"
directory: "laravel-ohdear"
schedule:
interval: monthly
time: "06:00"
Expand All @@ -37,7 +38,7 @@ updates:
- dep:php

- package-ecosystem: composer
directory: "laravel-infrastructure"
directory: "laravel-one"
schedule:
interval: monthly
time: "06:00"
Expand All @@ -49,7 +50,7 @@ updates:
- dep:php

- package-ecosystem: composer
directory: "laravel-one"
directory: "laravel-sentry-handler"
schedule:
interval: monthly
time: "06:00"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/laravel-infrastructure-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
test:
runs-on: ubuntu-latest
concurrency:
group: laravel-infrastructure-test
group: laravel-infrastructure-test-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: true
Expand All @@ -40,10 +40,10 @@ jobs:
php-version: ${{ env.php_version }}

- name: Configure Composer cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: auth/vendor
key: ${{ runner.os }}-node-php_${{ env.php_version }}-${{ hashFiles('**/composer.lock') }}
key: ${{ runner.os }}-node-php_${{ env.php_version }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-node-php_${{ env.php_version }}-

- name: Composer install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/laravel-ohdear-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: true
concurrency:
group: laravel-ohdear-test
group: laravel-ohdear-test-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:

Expand All @@ -41,7 +41,7 @@ jobs:

- name: Configure Composer cache
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/vendor
key: ${{ runner.os }}-node-php_${{ env.php_version }}-${{ hashFiles('**/composer.json') }}
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/laravel-one-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
fetch-depth: 1

- name: Get current release tag
id: branch_name
run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/laravel-one-}
id: branch-name
run: echo "SOURCE_TAG=${GITHUB_REF#refs/tags/phpunit-slicer-}" >> $GITHUB_OUTPUT

- name: Initialize PHP ${{ env.php_version }}
uses: shivammathur/setup-php@v2
Expand All @@ -39,7 +39,7 @@ jobs:

- name: Configure Composer cache
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: laravel-one/vendor
key: ${{ runner.os }}-node-php_${{ env.php_version }}-${{ hashFiles('**/composer.json') }}
Expand All @@ -48,14 +48,15 @@ jobs:
- name: Composer install
if: steps.composer-cache.outputs.cache-hit != 'true'
run: |
composer -V
composer validate --strict
composer install --optimize-autoloader --no-interaction --prefer-dist
run: composer install --optimize-autoloader --no-interaction --prefer-dist

- name: Build VHS
uses: charmbracelet/vhs-action@v1
with:
path: 'laravel-one/demo.tape'

- name: Build
run: |
php laravel-one app:build laravel-one --build-version=${{ steps.branch_name.outputs.SOURCE_TAG }}
run: php laravel-one app:build laravel-one --build-version=${{ steps.branch-name.outputs.SOURCE_TAG }}

- name: Publish to readonly repository abenevaut/laravel-one
uses: s0/git-publish-subdir-action@develop
Expand All @@ -64,4 +65,4 @@ jobs:
BRANCH: master
FOLDER: laravel-one
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY_LARAVEL_ONE }}
TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
TAG: ${{ steps.branch-name.outputs.SOURCE_TAG }}
40 changes: 23 additions & 17 deletions .github/workflows/laravel-one-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,59 +14,65 @@ defaults:
run:
working-directory: ./laravel-one

env:
php_version: 8.1

jobs:

test:
runs-on: ubuntu-latest
concurrency:
group: laravel-one-test
cancel-in-progress: true
strategy:
fail-fast: true
matrix:
php_version: [ 8.1, 8.2 ]
include:
- php_version: 8.2
record_coverage: true
concurrency:
group: laravel-one-test-${{ github.workflow }}-${{ github.ref }}-${{ matrix.php_version }}
cancel-in-progress: true
steps:

- name: Checkout project
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Initialize PHP ${{ env.php_version }}
- name: Initialize PHP ${{ matrix.php_version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php_version }}
php-version: ${{ matrix.php_version }}
coverage: pcov

- name: Configure Composer cache
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: laravel-one/vendor
key: ${{ runner.os }}-node-php_${{ env.php_version }}-${{ hashFiles('**/composer.lock') }}
key: ${{ runner.os }}-node-php_${{ matrix.php_version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-node-php_${{ env.php_version }}-
${{ runner.os }}-node-php_${{ matrix.php_version }}-
- name: Validate Composer.json
run: composer validate --strict

- name: Composer install
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install -o --no-interaction --prefer-dist

- name: Web pages cache
id: web-pages-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: laravel-one/.cache
key: ${{ runner.os }}-node-php_${{ env.php_version }}-web-pages-cache-${{ hashFiles('**/composer.lock') }}
key: ${{ runner.os }}-node-php_${{ matrix.php_version }}-web-pages-cache-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-node-php_${{ env.php_version }}-web-pages-cache-
${{ runner.os }}-node-php_${{ matrix.php_version }}-web-pages-cache-
- name: Run tests
run: |
php laravel-one test:arkitect
php laravel-one test
- name: Send coverage
run: |
bash <(curl -s https://codecov.io/bash) -f coverage/clover.xml -F laravel-one
if: ${{ matrix.record_coverage }}
run: bash <(curl -s https://codecov.io/bash) -f coverage/clover.xml -F laravel-one
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
20 changes: 16 additions & 4 deletions .github/workflows/laravel-sentry-handler-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: laravel-sentry-handler-release

on:
push:
branches: [ master ]
paths:
- 'laravel-sentry-handler/**'
tags:
- laravel-sentry-handler-*

defaults:
run:
Expand All @@ -14,14 +13,27 @@ jobs:

release:
runs-on: ubuntu-latest
if: contains(github.ref, 'refs/heads/master')
strategy:
fail-fast: true
concurrency:
group: laravel-sentry-handler-release
cancel-in-progress: false
steps:

- name: Checkout project
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Get current release semver tag
id: branch-name
run: echo "SOURCE_TAG=${GITHUB_REF#refs/tags/phpunit-slicer-}" >> $GITHUB_OUTPUT

- name: Publish to repository opensource/laravel-sentry-handler
uses: s0/git-publish-subdir-action@develop
env:
REPO: git@github.com:abenevaut/laravel-sentry-handler.git
BRANCH: master
FOLDER: laravel-sentry-handler
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY_LARAVEL_SENTRY_HANDLER }}
TAG: ${{ steps.branch-name.outputs.SOURCE_TAG }}
87 changes: 87 additions & 0 deletions .github/workflows/laravel-sentry-handler-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: laravel-sentry-handler-test

on:
push:
branches: [ master ]
paths:
- 'laravel-sentry-handler/**'
pull_request:
branches: [ master ]
paths:
- 'laravel-sentry-handler/**'

defaults:
run:
working-directory: laravel-sentry-handler

jobs:

test:
runs-on: ubuntu-latest
permissions:
pull-requests: write
strategy:
fail-fast: true
matrix:
php_version: [ 8.1, 8.2 ]
include:
- php_version: 8.2
record_coverage: true
concurrency:
group: laravel-sentry-handler-test-${{ github.workflow }}-${{ github.ref }}-${{ matrix.php_version }}
cancel-in-progress: true
steps:

- name: Checkout project
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Initialize PHP ${{ matrix.php_version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
coverage: pcov

- name: Configure Composer cache
id: composer-cache
uses: actions/cache@v3
with:
path: laravel-sentry-handler/vendor
key: ${{ runner.os }}-node-php_${{ matrix.php_version }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-node-php_${{ matrix.php_version }}-
- name: Validate Composer.json
run: composer validate --strict

- name: Composer install
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install -o --no-interaction --prefer-dist

- name: Smelly Code Detector
if: github.event_name == 'pull_request' && matrix.record_coverage
run: |
vendor/bin/smelly-code-detector inspect src | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g" > tmp.txt
sed '$d' tmp.txt > tmp2.txt
sed '$d' tmp2.txt > tmp.txt
sed '2d' tmp.txt > tmp2.txt
sed '2d' tmp2.txt > tmp.txt
sed '2d' tmp.txt > tmp2.txt
sed 's/+/|/g' tmp2.txt > ../.github/workflows/smelly-code-detector.txt
- uses: NejcZdovc/comment-pr@v2
if: github.event_name == 'pull_request' && matrix.record_coverage
with:
file: smelly-code-detector.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Test
run: vendor/bin/phpunit

- name: Send coverage
if: ${{ matrix.record_coverage }}
run: bash <(curl -s https://codecov.io/bash) -f coverage/clover.xml -F laravel-sentry-handler
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Loading

0 comments on commit 009bd97

Please sign in to comment.