Skip to content

Commit

Permalink
Add GH Actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderdlm committed Jun 7, 2024
1 parent 93105fc commit 1d32287
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test & static analysis

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
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.3"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"

- name: "Run a static analysis with phpstan/phpstan"
run: "vendor/bin/phpstan analyse --memory-limit=2G"

phpcs:
runs-on: "ubuntu-latest"

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

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.3"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"

- name: "Run phpcs"
run: "vendor/bin/phpcs"

phpunit:
runs-on: "ubuntu-latest"

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

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.3"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"

- name: "Run phpunit"
run: "vendor/bin/phpunit"

0 comments on commit 1d32287

Please sign in to comment.