From 1d689bb5a9a82a47f8ace67070855aa3980fba54 Mon Sep 17 00:00:00 2001 From: Dan Charousek Date: Thu, 23 Nov 2023 21:45:36 +0100 Subject: [PATCH 1/2] Add github workflow --- .github/workflows/php.yml | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..cb08584 --- /dev/null +++ b/.github/workflows/php.yml @@ -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 + From cd433b4629a3501e72634dcdc20922d6b52e5444 Mon Sep 17 00:00:00 2001 From: Dan Charousek Date: Thu, 23 Nov 2023 21:49:29 +0100 Subject: [PATCH 2/2] Add MIT license to composer.json file. --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index e3b4cc2..20b931a 100644 --- a/composer.json +++ b/composer.json @@ -3,6 +3,7 @@ "description": "Client for communication with Bank iD services", "type": "library", "minimum-stability": "dev", + "license": "MIT", "prefer-stable": true, "authors": [ {