Skip to content

Commit

Permalink
Updated configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
batumibiz committed Dec 9, 2022
1 parent 280b39c commit 32716f4
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 186 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: analysis
on: [push, pull_request]
on: [ push, pull_request ]

jobs:
coding-standard:
name: Coding Standard
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -16,13 +16,13 @@ jobs:

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v2
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
Expand All @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -45,17 +45,17 @@ jobs:

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v2
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --no-interaction

- name: Static Analysis using Psalm
- name: Static Analysis
run: composer static-analysis
18 changes: 9 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -26,35 +26,35 @@ jobs:

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v2
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --no-interaction
run: composer install --no-progress --no-interaction --ignore-platform-req=php

- name: Start MySQL
run: sudo /etc/init.d/mysql start

- name: PhpUnit test
- name: Test
if: matrix.php-versions != '8.2'
run: composer test
continue-on-error: true

- name: PhpUnit test-coverage
- name: Test with Coverage
if: matrix.php-versions == '8.2'
working-directory: ./
run: |
composer test-coverage
sed -i 's/\/home\/runner\/work\/testutils\/testutils\//\/github\/workspace\//g' report.xml
sed -i 's/\/home\/runner\/work\/testutils\/testutils\//\/github\/workspace\//g' clover.xml
- name: Upload coverage report
- name: Scan code with SonarCloud
if: matrix.php-versions == '8.2'
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "8.0"
}
},
"require": {
Expand Down
Loading

0 comments on commit 32716f4

Please sign in to comment.