Skip to content

Commit

Permalink
👷 Add new github actions (laravelcm#115)
Browse files Browse the repository at this point in the history
* 👷 Add new github actions

* 💚 Update phpstan CI
  • Loading branch information
mckenziearts authored May 17, 2023
1 parent b75932c commit 2994684
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
custom: https://laravel.cm/sponsors

11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Get Help
url: https://laravel.cm/forum/new-thread
about: If you need help with your project create a topic on our forum.
- name: Bug Report
url: https://github.com/laravelcm/issues
about: 'For projects issues, suggest changes on our issues repository.'
- name: Feature Request
url: https://github.com/laravelcm/laravel.cm/discussions/new?category=ideas
about: Share ideas for new features
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: fix code styling
name: Check & fix styling

on: [push, pull_request]

Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: dependabot-auto-merge
on: pull_request_target

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:

- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Auto-merge Dependabot PRs for semver-minor updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
35 changes: 35 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PHPStan

on:
push:
pull_request:

jobs:
phpstan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2]
laravel: [9.*]
dependency-version: [prefer-stable]
include:
- laravel: 9.*
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
steps:
- uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-interaction
- name: Run PHPStan
run: composer stan

0 comments on commit 2994684

Please sign in to comment.