Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
endroid committed Dec 2, 2020
1 parent 9cdd4f5 commit 224fd10
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']
php-versions: ['7.3', '7.4', '8.0']
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand All @@ -16,22 +16,44 @@ jobs:
php-version: ${{ matrix.php-versions }}
extensions: gd, mbstring, pcov, zip
ini-values: max_execution_time=600, memory_limit=-1
- name: Install dependencies
tools: composer:v2
coverage: pcov
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

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

- name: Setup problem matchers
run: |
curl -sS https://getcomposer.org/installer | php -- --filename=composer
./composer install
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install Composer dependencies
run: composer install --prefer-dist

- name: Check code quality
run: |
vendor/bin/code-quality
run: vendor/bin/code-quality

- name: Test against highest versions
run: |
vendor/bin/unit-test
vendor/bin/functional-test
- name: Test against lowest versions
run: |
./composer update --prefer-lowest
composer update --prefer-lowest
vendor/bin/unit-test
vendor/bin/functional-test ^4.4
vendor/bin/functional-test ^3.4
- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
}
],
"require": {
"php": ">=7.2",
"php": "^7.3||^8.0",
"bacon/bacon-qr-code": "^2.0",
"khanamiryan/qrcode-detector-decoder": "^1.0.2",
"myclabs/php-enum": "^1.5",
"symfony/options-resolver": "^3.4||^4.4||^5.0",
"symfony/property-access": "^3.4||^4.4||^5.0",
"myclabs/php-enum": "^1.5"
"symfony/property-access": "^3.4||^4.4||^5.0"
},
"require-dev": {
"endroid/quality": "^1.3.7",
"endroid/quality": "^1.5.1",
"setasign/fpdf": "^1.8"
},
"suggest": {
Expand Down

0 comments on commit 224fd10

Please sign in to comment.