Skip to content
Open
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
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "monthly"
64 changes: 64 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches: [ main ]
pull_request:

jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Setup PHP with extensions
uses: shivammathur/setup-php@v2

- uses: "ramsey/composer-install@v3"
with:
composer-options: "--prefer-dist"

- name: Run PHP CS Fixer
run: vendor/bin/php-cs-fixer check

phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Setup PHP with extensions
uses: shivammathur/setup-php@v2

- name: Validate composer.json and composer.lock
run: composer validate

- uses: "ramsey/composer-install@v3"
with:
composer-options: "--prefer-dist"

- name: Run PHPStan
run: composer run-script phpstan

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "8.3"
- "8.4"

steps:
- uses: actions/checkout@v5

- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"

- uses: "ramsey/composer-install@v3"
with:
composer-options: "--prefer-dist"

- name: Run tests
run: composer run-script test
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "tiime/universal-business-language",
"type": "library",
"license": "MIT",
"description": "PHP library to generate and parse UBL documents",
"require": {
"php": ">=8.3",
"ext-dom": "*",
Expand Down Expand Up @@ -29,11 +30,11 @@
},
"authors": [],
"scripts": {
"test": "vendor/bin/phpunit tests --display-warnings",
"test": "vendor/bin/phpunit --display-warnings",
"coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --testsuite default --coverage-text",
"fix-cs": "vendor/bin/php-cs-fixer fix src",
"fix-cs-test": "vendor/bin/php-cs-fixer fix tests",
"phpstan": "vendor/bin/phpstan analyse -l 9 src tests"
"phpstan": "vendor/bin/phpstan analyse -c phpstan.neon.dist"
},
"minimum-stability": "stable"
}
Loading
Loading