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
58 changes: 58 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: PHP Composer

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

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

phpstan:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v3

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

phpcs:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v3

- name: Run PHP Code Sniffer
run: composer run-script phpcs

phpunit:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v3

- name: Run unit tests
run: composer run-script phpunit

1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "Client for communication with Bank iD services",
"type": "library",
"minimum-stability": "dev",
"license": "MIT",
"prefer-stable": true,
"authors": [
{
Expand Down