Skip to content

Commit

Permalink
Github workflow, .editorconfig and .gitattributes
Browse files Browse the repository at this point in the history
  • Loading branch information
otsch committed Jan 31, 2024
1 parent 8708140 commit 8e74eb5
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig is awesome: http://EditorConfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.github export-ignore
bin export-ignore
tests export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php-cs-fixer.php export-ignore
phpstan.neon export-ignore
phpunit.xml export-ignore
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on: pull_request

jobs:
cs:
name: PHP CS Fixer
runs-on: ubuntu-latest

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

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

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

- name: Run PHP CS Fixer
run: composer cs

tests:
name: PestPHP Tests
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.1', '8.2', '8.3' ]

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

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

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

- name: Run tests
run: composer test

stan:
name: PHPStan
runs-on: ubuntu-latest

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

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

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

- name: Run PHPStan
run: composer stan

0 comments on commit 8e74eb5

Please sign in to comment.