Skip to content

Commit

Permalink
Merge pull request #1 from cable8mm/psr
Browse files Browse the repository at this point in the history
Set up PSR standard and test environment
  • Loading branch information
styoo4001 authored Mar 28, 2024
2 parents 529315d + 3d20e6f commit b3e2bde
Show file tree
Hide file tree
Showing 27 changed files with 818 additions and 631 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: code-style

on:
workflow_dispatch:
push:
branches-ignore:
- "dependabot/npm_and_yarn/*"
jobs:
pint:
runs-on: ubuntu-latest
name: Pint
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: "laravel-pint"
uses: aglipanci/[email protected]
with:
preset: laravel

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: PHP Linting (Pint)
skip_fetch: true
38 changes: 38 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: run-tests

on:
workflow_dispatch:
push:
branches-ignore:
- "dependabot/npm_and_yarn/*"

jobs:
test:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1, 8.2, 8.3]

name: PHP ${{ matrix.php }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Execute tests
run: composer test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/composer.lock
/.phpunit.result.cache
/.vscode
Loading

0 comments on commit b3e2bde

Please sign in to comment.