Skip to content

Commit

Permalink
Merge pull request #226 from Ocramius/feature/php-8-and-ci-overhaul
Browse files Browse the repository at this point in the history
Upgraded dependencies, testing against PHP 8.1, enabled Dependabot
  • Loading branch information
Ocramius authored Sep 19, 2021
2 parents 031e3e9 + 9e848ea commit f4e388a
Show file tree
Hide file tree
Showing 13 changed files with 738 additions and 426 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [Ocramius]
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 2,
"updates": [
{
"allow": [
{
"dependency-type": "all"
}
],
"directory": "/",
"package-ecosystem": "composer",
"schedule": {
"interval": "daily"
},
"versioning-strategy": "increase"
},
{
"directory": "/",
"package-ecosystem": "github-actions",
"schedule": {
"interval": "daily"
}
}
]
}
12 changes: 0 additions & 12 deletions .github/workflows/bc-check.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/coding-standards.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,48 @@
name: "PHPUnit tests"
# See https://github.com/laminas/laminas-continuous-integration-action
# Generates a job matrix based on current dependencies and supported version
# ranges, then runs all those jobs
name: "Continuous Integration"

on:
pull_request:
push:

jobs:
phpunit:
name: "PHPUnit tests"
matrix:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Gather CI configuration
id: matrix
uses: laminas/laminas-ci-matrix-action@1.10.0

qa:
name: QA Checks
needs: [ matrix ]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@1.12.0
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
with:
job: ${{ matrix.job }}

demo-scripts:
name: "Check Demo Scripts"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "lowest"
- "highest"
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"
Expand All @@ -31,7 +56,6 @@ jobs:
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: "Cache dependencies"
Expand All @@ -55,5 +79,7 @@ jobs:
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Tests"
run: "vendor/bin/phpunit"
- name: "Check Demo Scripts"
run: |
php examples/persisting-new-objects-in-batch.php
php examples/working-with-query-resultsets-in-batch.php
23 changes: 23 additions & 0 deletions .github/workflows/merge-dependabot-upgrades.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://github.com/ridedott/merge-me-action/
# This workflow automates merges from patches sent by Dependabot, and
# only by dependabot, once the other CI workflows pass
name: Auto-merge Dependabot PRs

on:
workflow_run:
types:
- completed
workflows:
- "Continuous Integration"

jobs:
merge-me:
name: Auto-merge Dependabot PRs
runs-on: ubuntu-latest
steps:
- name: Auto-Merge
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ridedott/merge-me-action@v2.9.35
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_METHOD: MERGE
59 changes: 0 additions & 59 deletions .github/workflows/mutation-tests.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/psalm.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,13 @@ jobs:
"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 }}
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
}
],
"require": {
"php": "^7.4.0|| ^8.0",
"doctrine/orm": "^2.8",
"doctrine/persistence": "^2.2.1"
"php": "^7.4.0 || ^8.0",
"doctrine/orm": "^2.9.5",
"doctrine/persistence": "^2.2.2"
},
"require-dev": {
"doctrine/coding-standard": "^9.0.0",
"infection/infection": "^0.21.5",
"phpunit/phpunit": "^9.5",
"vimeo/psalm": "^4.9.1"
"roave/infection-static-analysis-plugin": "^1.10.0",
"phpunit/phpunit": "^9.5.9",
"vimeo/psalm": "^4.10.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit f4e388a

Please sign in to comment.