Skip to content

Commit

Permalink
Merge pull request #1 from mittwald/feature/ci
Browse files Browse the repository at this point in the history
Configure CI and common QA jobs
  • Loading branch information
martin-helmich authored Oct 29, 2024
2 parents db42c3f + ef24399 commit f60c1e9
Show file tree
Hide file tree
Showing 15 changed files with 178 additions and 2,587 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
35 changes: 35 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PHP type checking and unit testing

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

jobs:
build:
strategy:
matrix:
php-versions: ['8.2', '8.3']
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, json
coverage: pcov

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

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run unit tests
run: ./vendor/bin/phpunit --testdox

- name: Run type checker
run: ./vendor/bin/phpstan analyse src
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.idea
/vendor
/.phpunit.cache
/.phpunit.cache
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@
"require": {
"mittwald/api-client": "^2.1",
"psr/http-message": "^2.0",
"psr/log": "^3.0"
"psr/log": "^3.0",
"psr/cache": "^3.0",
"ext-sodium": "*"
},
"require-dev": {
"phpunit/phpunit": "^11.4",
"nyholm/psr7": "^1.8"
"nyholm/psr7": "^1.8",
"phpstan/phpstan": "^1.12"
}
}
Loading

0 comments on commit f60c1e9

Please sign in to comment.