-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from bednic/master
feat: Add support for PHP 8
- Loading branch information
Showing
7 changed files
with
193 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
||
name: "Mutation tests" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
mutation-tests: | ||
name: "Mutation tests" | ||
|
||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
matrix: | ||
dependencies: | ||
- "locked" | ||
php-version: | ||
- "7.4" | ||
operating-system: | ||
- "ubuntu-latest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{ matrix.php-version }}" | ||
ini-values: memory_limit=-1 | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: | | ||
~/.composer/cache | ||
vendor | ||
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" | ||
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" | ||
|
||
- name: "Install lowest dependencies" | ||
if: ${{ matrix.dependencies == 'lowest' }} | ||
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Install highest dependencies" | ||
if: ${{ matrix.dependencies == 'highest' }} | ||
run: "composer update --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Install locked dependencies" | ||
if: ${{ matrix.dependencies == 'locked' }} | ||
run: "composer install --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Infection" | ||
run: "vendor/bin/infection" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
||
name: "PHPUnit tests" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
phpunit: | ||
name: "PHPUnit tests" | ||
|
||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
matrix: | ||
dependencies: | ||
- "lowest" | ||
- "highest" | ||
- "locked" | ||
php-version: | ||
- "7.4" | ||
operating-system: | ||
- "ubuntu-latest" | ||
- "windows-latest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{ matrix.php-version }}" | ||
ini-values: memory_limit=-1 | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: | | ||
~/.composer/cache | ||
vendor | ||
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" | ||
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" | ||
|
||
- name: "Install lowest dependencies" | ||
if: ${{ matrix.dependencies == 'lowest' }} | ||
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Install highest dependencies" | ||
if: ${{ matrix.dependencies == 'highest' }} | ||
run: "composer update --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Install locked dependencies" | ||
if: ${{ matrix.dependencies == 'locked' }} | ||
run: "composer install --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Tests" | ||
run: "vendor/bin/phpunit" |
61 changes: 61 additions & 0 deletions
61
.github/workflows/release-on-milestone-closed-triggering-release-event.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Alternate workflow example. | ||
# This one is identical to the one in release-on-milestone.yml, with one change: | ||
# the Release step uses the ORGANIZATION_ADMIN_TOKEN instead, to allow it to | ||
# trigger a release workflow event. This is useful if you have other actions | ||
# that intercept that event. | ||
|
||
name: "Automatic Releases" | ||
|
||
on: | ||
milestone: | ||
types: | ||
- "closed" | ||
|
||
jobs: | ||
release: | ||
name: "GIT tag, release & create merge-up PR" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Release" | ||
uses: "laminas/automatic-releases@v1" | ||
with: | ||
command-name: "laminas:automatic-releases:release" | ||
env: | ||
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }} | ||
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} | ||
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} | ||
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} | ||
|
||
- name: "Create Merge-Up Pull Request" | ||
uses: "laminas/automatic-releases@v1" | ||
with: | ||
command-name: "laminas:automatic-releases:create-merge-up-pull-request" | ||
env: | ||
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }} | ||
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} | ||
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} | ||
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} | ||
|
||
- name: "Create and/or Switch to new Release Branch" | ||
uses: "laminas/automatic-releases@v1" | ||
with: | ||
command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor" | ||
env: | ||
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }} | ||
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} | ||
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} | ||
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} | ||
|
||
- name: "Create new milestones" | ||
uses: "laminas/automatic-releases@v1" | ||
with: | ||
command-name: "laminas:automatic-releases:create-milestones" | ||
env: | ||
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }} | ||
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }} | ||
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} | ||
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters