Skip to content

GH Actions: various workflow tweaks #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 8, 2021
Merged
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
9 changes: 7 additions & 2 deletions .github/workflows/check-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
pull_request:
branches:
- "*"
# Allow manually triggering the workflow.
workflow_dispatch:

jobs:
fix-style:
Expand All @@ -25,11 +27,14 @@ jobs:
with:
php-version: 7.4
coverage: none
tools: composer
tools: composer, cs2pr

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

- name: Check Code Style
run: vendor/bin/phpcs
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml

- name: Show PHPCS results in PR
run: cs2pr ./phpcs-report.xml
19 changes: 17 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- "*"
schedule:
- cron: '0 0 * * *'
# Allow manually triggering the workflow.
workflow_dispatch:

jobs:
php-tests:
Expand All @@ -19,10 +21,17 @@ jobs:

strategy:
matrix:
php: [8.x, 7.4, 7.3]
php: ['8.0', '7.4', '7.3']
dependency-version: [prefer-lowest, prefer-stable]
experimental: [false]

include:
- php: '8.1'
dependency-version: 'prefer-stable'
experimental: true

name: P${{ matrix.php }} - ${{ matrix.dependency-version }}
continue-on-error: ${{ matrix.experimental }}

steps:
- name: Checkout code
Expand All @@ -35,9 +44,15 @@ jobs:
coverage: none
tools: composer

- name: Install dependencies
- name: Install dependencies - normal
if: ${{ matrix.php < 8.1 }}
run: |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress

- name: Install dependencies - ignore platform reqs
if: ${{ matrix.php >= 8.1 }}
run: |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --ignore-platform-reqs

- name: Execute Unit Tests
run: vendor/bin/phpunit