Skip to content

Commit

Permalink
Merge pull request #2 from the-kbA-team/1-check-if-code-works-under-p…
Browse files Browse the repository at this point in the history
…hp-81

code runs under php 8.1
  • Loading branch information
gregor-j authored Mar 20, 2024
2 parents 572f116 + 2a47edc commit 53a4dfa
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 1,229 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events
push:
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Composer config validation
composer:
name: Composer config validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate composer.json
run: composer validate --strict

# PHP syntax validation
php:
name: PHP syntax validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check PHP syntax
run: php -l src/ tests/

phpunit:
name: PHPUnit tests
runs-on: ubuntu-latest
strategy:
matrix:
php_version: [7.4, 8.0, 8.1, 8.2]
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php_version }}
- run: vendor/bin/phpunit

# phpstan for several php versions
phpstan:
runs-on: ubuntu-latest
strategy:
matrix:
php_version: [7.4, 8.0, 8.1, 8.2]
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php_version }}
- name: PHPStan Static Analysis
uses: php-actions/phpstan@v3
with:
php_version: ${{ matrix.php_version }}
configuration: phpstan.neon
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
/composer.lock
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
],
"minimum-stability": "stable",
"require": {
"php": "^7.0",
"php": "^7.4|<8.4",
"ext-openssl": "*"
},
"require-dev": {
"phpunit/phpunit": "^4.8"
"phpunit/phpunit": "^9.6"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit 53a4dfa

Please sign in to comment.