Skip to content

Commit

Permalink
github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Jul 1, 2024
1 parent 0981904 commit 1ce07f7
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
* text=auto

/archive export-ignore
/_archive export-ignore
/tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
phpcs.xml.dist export-ignore
phpunit.xml.dist export-ignore
64 changes: 64 additions & 0 deletions .github/workflows/pr_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on: [push, pull_request]

jobs:
phpunit-9-6:
strategy:
fail-fast: false
matrix:
php_version: ["7.4", "8.1", "8.2", "8.3"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: "7.4"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
coverage: xdebug
- name: Unit Tests with PHPUnit 9.6
run: vendor/bin/phpunit --stderr --version 9.6

phpunit-10-5:
strategy:
fail-fast: false
matrix:
php_version: ["8.1", "8.2", "8.3"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: "8.1"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
coverage: xdebug
- name: Unit Tests with PHPUnit 10.5
run: vendor/bin/phpunit --stderr --version 10.5

phpunit-11-2:
strategy:
fail-fast: false
matrix:
php_version: ["8.2", "8.3"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: "8.2"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
coverage: xdebug
- name: Unit Tests with PHPUnit 11.2
run: vendor/bin/phpunit --stderr --version 11.2
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
\#*
*.bak
.idea/
coverage.clover
vendor/
composer.lock
coverage.clover
git-phpcs.phar
15 changes: 14 additions & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# .scrutinizer.yml
build:
nodes:
analysis:
environment:
php:
version: 7.4
project_setup:
override: true
tests:
override:
- php-scrutinizer-run
- php-scrutinizer-run
filter:
excluded_paths:
- '_archive/*'
- 'tests/*'
tools:
external_code_coverage:
timeout: 300 # Timeout in seconds.
5 changes: 4 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
Expand Down

0 comments on commit 1ce07f7

Please sign in to comment.