Skip to content

Commit

Permalink
Add github actions CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
otsch committed Nov 7, 2021
1 parent 090dcb3 commit b73e80d
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI (tests, code style, phpstan)

on: push

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

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

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

- name: Check PHP Version
run: php -v

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

- name: Run PHP CS Fixer
run: composer cs

tests:
name: PHPUnit tests
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4', '8.0']

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

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

- name: Check PHP Version
run: php -v

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

- name: Run tests
run: composer test

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

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

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

- name: Check PHP Version
run: php -v

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

- name: Run PHPStan
run: composer stan

0 comments on commit b73e80d

Please sign in to comment.