Skip to content

Commit

Permalink
[GitHub] Update GitHub Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
onairmarc committed Nov 29, 2024
1 parent deb9197 commit d0f994d
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 116 deletions.
43 changes: 1 addition & 42 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,46 +1,5 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.

* @onairmarc

# *.js @js-owner #This is an inline comment.

/composer.json @EncoreDigitalGroup/dependency-management
/package.json @EncoreDigitalGroup/dependency-management

/.github/ @onairmarc
/.github/dependabot.yml @EncoreDigitalGroup/dependency-management

# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.
# bdocs/* [email protected]

# In this example, @octocat owns any file in an apps directory
# anywhere in your repository.
# apps/ @octocat

# In this example, @doctocat owns any file in the `/docs`
# directory in the root of your repository and any of its
# subdirectories.
# /docs/ @doctocat

# In this example, any change inside the `/scripts` directory
# will require approval from @doctocat or @octocat.
# /scripts/ @doctocat @octocat

# In this example, @octocat owns any file in a `/logs` directory such as
# `/build/logs`, `/scripts/logs`, and `/deeply/nested/logs`. Any changes
# in a `/logs` directory will require approval from @octocat.
# **/logs @octocat

# In this example, @octocat owns any file in the `/apps`
# directory in the root of your repository except for the `/apps/github`
# subdirectory, as its owners are left empty.
# /apps/ @octocat
# /apps/github
/.github/dependabot.yml @EncoreDigitalGroup/dependency-management
21 changes: 7 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "composer" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: weekly
day: wednesday
time: "12:00"
timezone: America/Chicago
reviewers:
- "EncoreDigitalGroup/dependency-management"
- package-ecosystem: "composer" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: weekly
day: wednesday
time: "12:00"
timezone: America/Chicago
61 changes: 53 additions & 8 deletions .github/workflows/_pullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,79 @@ name: Pull Request

on:
pull_request_target:
workflow_dispatch:

concurrency:
group: ${{ github.repository }}-${{ github.event.pull_request.number }}-pullRequest
cancel-in-progress: true

permissions:
contents: write
pull-requests: write

jobs:
GitStatusCheck:
name: GitStatusCheck
runs-on: ubuntu-latest
outputs:
shouldRun: ${{ steps.GitStatusCheck.outputs.shouldRun }}
steps:
- name: GitStatusCheck
id: GitStatusCheck
uses: EncoreDigitalGroup/ci-workflows/actions/php/gitStatusCheck@v2

FormatTitle:
name: FormatTitle
runs-on: ubuntu-latest
steps:
- name: FormatTitle
uses: EncoreDigitalGroup/ci-workflows/actions/github/formatPullRequestTitle@v2
with:
branch: ${{ github.head_ref }}
pullRequestNumber: ${{ github.event.number }}
repository: ${{ github.repository }}
token: ${{ secrets.GITHUB_TOKEN }}

Rector:
needs: GitStatusCheck
name: Rector
if: needs.GitStatusCheck.outputs.shouldRun == 'true'
runs-on: ubuntu-latest
steps:
- name: Rector
uses: EncoreDigitalGroup/ci-workflows/actions/php/rector@v2
with:
branch: "${{ github.ref }}"
repository: "${{ github.repository }}"

Duster:
needs: Rector
name: Duster
uses: EncoreDigitalGroup/ci-workflows/.github/workflows/dusterFixBlame.yml@v1
uses: EncoreDigitalGroup/ci-workflows/.github/workflows/php_dusterFix.yml@v2
permissions:
contents: write
pull-requests: write

StaticAnalysis:
needs: Duster
name: StaticAnalysis
uses: EncoreDigitalGroup/ci-workflows/.github/workflows/larastan.yml@v1
uses: EncoreDigitalGroup/ci-workflows/.github/workflows/php_larastan.yml@v2
with:
phpVersion: '8.3'
phpVersion: "8.3"
path: "src/"
branch: ${{ github.head_ref }}
path: 'src/'

Test:
needs: Duster
name: Test
uses: EncoreDigitalGroup/ci-workflows/.github/workflows/pest.yml@v1
uses: EncoreDigitalGroup/ci-workflows/.github/workflows/php_pest.yml@v2
with:
phpVersion: '8.3'
phpVersion: "8.3"
branch: ${{ github.head_ref }}
enforceCoverage: false
runParallel: true

AutoMerge:
needs: [ StaticAnalysis, Test ]
name: AutoMerge
uses: EncoreDigitalGroup/ci-workflows/.github/workflows/dependabotAutoMerge.yml@v1
name: Auto-Merge
uses: EncoreDigitalGroup/ci-workflows/.github/workflows/github_dependabotAutoMerge.yml@v2
2 changes: 1 addition & 1 deletion .github/workflows/_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions: write-all
jobs:
CreateRelease:
name: Create Release
uses: EncoreDigitalGroup/ci-workflows/.github/workflows/createRelease.yml@v1
uses: EncoreDigitalGroup/ci-workflows/.github/workflows/github_createRelease.yml@v2
permissions:
contents: write
with:
Expand Down
5 changes: 5 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/stdlib.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,10 @@
"src/ObjectHelpers/val_helpers.php"
]
},
"scripts": {
"post-autoload-dump": [
"PHPGenesis\\Common\\Composer\\Scripts::postAutoloadDump"
]
},
"minimum-stability": "stable"
}
98 changes: 49 additions & 49 deletions pint.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
{
"preset": "laravel",
"rules": {
"blank_line_between_import_groups": true,
"class_attributes_separation": {
"elements": {
"const": "none",
"method": "one",
"property": "none",
"trait_import": "none",
"case": "none"
}
},
"concat_space": {
"spacing": "one"
},
"explicit_string_variable": true,
"global_namespace_import": {
"import_classes": true,
"import_constants": true,
"import_functions": true
},
"ordered_imports": {
"sort_algorithm": "alpha"
},
"php_unit_test_annotation": {
"style": "annotation"
},
"simple_to_complex_string_variable": true,
"blank_line_after_namespace": true,
"array_push": true,
"cast_spaces": true,
"braces_position": true,
"constant_case": true,
"indentation_type": true,
"line_ending": true,
"linebreak_after_opening_tag": true,
"lowercase_static_reference": true,
"method_argument_space": true,
"no_closing_tag": true,
"no_empty_comment": true,
"no_empty_phpdoc": true,
"no_spaces_after_function_name": true,
"no_useless_return": true,
"no_whitespace_in_blank_line": true,
"new_with_parentheses": true,
"new_with_braces": true,
"not_operator_with_successor_space": false,
"ternary_to_null_coalescing": true
}
"preset": "laravel",
"rules": {
"blank_line_between_import_groups": true,
"class_attributes_separation": {
"elements": {
"const": "none",
"method": "one",
"property": "none",
"trait_import": "none",
"case": "none"
}
},
"concat_space": {
"spacing": "one"
},
"explicit_string_variable": true,
"global_namespace_import": {
"import_classes": true,
"import_constants": true,
"import_functions": true
},
"ordered_imports": {
"sort_algorithm": "alpha"
},
"php_unit_test_annotation": {
"style": "annotation"
},
"simple_to_complex_string_variable": true,
"blank_line_after_namespace": true,
"array_push": true,
"cast_spaces": true,
"braces_position": true,
"constant_case": true,
"indentation_type": true,
"line_ending": true,
"linebreak_after_opening_tag": true,
"lowercase_static_reference": true,
"method_argument_space": true,
"no_closing_tag": true,
"no_empty_comment": true,
"no_empty_phpdoc": true,
"no_spaces_after_function_name": true,
"no_useless_return": true,
"no_whitespace_in_blank_line": true,
"new_with_parentheses": true,
"new_with_braces": true,
"not_operator_with_successor_space": false,
"ternary_to_null_coalescing": true
}
}
2 changes: 0 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
AddVoidReturnTypeWhereNoReturnRector::class,
])
->withSkip([
CallableThisArrayToAnonymousFunctionRector::class,
CompactToVariablesRector::class,
UseIdenticalOverEqualWithSameTypeRector::class,
LogicalToBooleanRector::class,
Expand All @@ -45,7 +44,6 @@
RenameForeachValueVariableToMatchExprVariableRector::class,
RenameParamToMatchTypeRector::class,
RenameVariableToMatchMethodCallReturnTypeRector::class,
ChangeAndIfToEarlyReturnRector::class,
SeparateMultiUseImportsRector::class,
RemoveExtraParametersRector::class,
NewlineAfterStatementRector::class,
Expand Down

0 comments on commit d0f994d

Please sign in to comment.