Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 6 additions & 63 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,14 @@
name: PHP Tests
name: CI

on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main

jobs:
lint:
name: Static analysis for PHP ${{ matrix.php }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.3', '8.4' ]
os: [ 'ubuntu-latest' ]

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: phpcs
extensions: ev

- name: Setup dependencies
run: composer require -n --no-progress overtrue/phplint

- name: PHP Lint
if: ${{ ! cancelled() }}
run: ./vendor/bin/phplint -n --exclude={^vendor/.*} -- .

- name: PHP CodeSniffer
if: ${{ ! cancelled() }}
run: phpcs -wps --colors

test:
name: Unit tests with PHP ${{ matrix.php }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
PHPUNIT_VERSION: 8.5

strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.3', '8.4' ]
os: [ 'ubuntu-latest' ]

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: phpunit:${{ env.PHPUNIT_VERSION }}
extensions: ev

- name: Setup dependencies
run: composer install -n --no-progress

- name: PHPUnit
run: phpunit --verbose
php:
name: PHP
uses: Icinga/github-actions/.github/workflows/php.yml@main
10 changes: 0 additions & 10 deletions .github/workflows/phpstan.yml

This file was deleted.

22 changes: 0 additions & 22 deletions phpcs.xml

This file was deleted.

3 changes: 0 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ parameters:
paths:
- src

scanDirectories:
- /usr/share/icinga-php

ignoreErrors:
-
messages:
Expand Down
17 changes: 0 additions & 17 deletions phpunit.xml

This file was deleted.

Loading