Skip to content

Upgraded dependencies, composer:^2 and php:^8, mutation tests CI improvements #97

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 13 commits into from
Jan 21, 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
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Simulate Docker Build"

on:
pull_request:
schedule:
- cron: '0 2 * * *' # run daily

jobs:
docker-build:
name: "Simulate Docker Build"

runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Docker Build"
run: "docker build ."
15 changes: 9 additions & 6 deletions .github/workflows/mutation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ name: "Mutation tests"

on:
pull_request:
push:
branches:
- "master"

jobs:
mutation-tests:
Expand All @@ -19,14 +16,17 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Fetch github.base_ref (for diffing)"
run: git fetch --depth=1 origin +refs/heads/${{github.base_ref}}:refs/remotes/origin/${{github.base_ref}}

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
Expand Down Expand Up @@ -56,8 +56,11 @@ jobs:
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Infection"
run: "vendor/bin/infection"
run: |
vendor/bin/roave-infection-static-analysis-plugin \
--ignore-msi-with-no-mutations \
--git-diff-filter=AM \
--git-diff-base=origin/${{ github.base_ref }}
env:
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand Down
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM composer:1 AS composer
FROM composer:2 AS composer

FROM ubuntu:20.04

Expand All @@ -23,13 +23,12 @@ RUN apt update \
gnupg \
libzip-dev \
zip \
php7.4-cli \
php7.4-curl \
php7.4-json \
php7.4-mbstring \
php7.4-readline \
php7.4-xml \
php7.4-zip \
php8.0-cli \
php8.0-curl \
php8.0-mbstring \
php8.0-readline \
php8.0-xml \
php8.0-zip \
&& apt clean

ADD composer.json /app/composer.json
Expand Down
5 changes: 3 additions & 2 deletions bin/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace Laminas\AutomaticReleases\WebApplication;

use DateTimeZone;
use ErrorException;
use Http\Discovery\HttpClientDiscovery;
use Http\Discovery\Psr17FactoryDiscovery;
Expand Down Expand Up @@ -88,7 +89,7 @@ static function (int $errorCode, string $message = '', string $file = '', int $l
$httpClient
));
$createReleaseText = new MergeMultipleReleaseNotes([
new CreateReleaseTextViaKeepAChangelog($changelogExists, new SystemClock()),
new CreateReleaseTextViaKeepAChangelog($changelogExists, new SystemClock(new DateTimeZone('UTC'))),
$createCommitText,
]);
$createRelease = new CreateReleaseThroughApiCall(
Expand All @@ -105,7 +106,7 @@ static function (int $errorCode, string $message = '', string $file = '', int $l
);

/** @psalm-suppress DeprecatedClass */
$application = new Application(Versions::ROOT_PACKAGE_NAME, Versions::getVersion('laminas/automatic-releases'));
$application = new Application(Versions::rootPackageName(), Versions::getVersion('laminas/automatic-releases'));

$application->addCommands([
new ReleaseCommand(
Expand Down
34 changes: 17 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
}
},
"require": {
"php": "^7.4.7",
"composer/package-versions-deprecated": "^1.10.99",
"jwage/changelog-generator": "^1.2.1",
"php": "^8.0.0",
"ocramius/package-versions": "^2.3.0",
"jwage/changelog-generator": "^1.3.0",
"laminas/laminas-diactoros": "^2.5.0",
"lcobucci/clock": "^1.3",
"monolog/monolog": "^2.1",
"phly/keep-a-changelog": "^2.9",
"php-http/curl-client": "^2.1.0",
"lcobucci/clock": "^2.0.0",
"monolog/monolog": "^2.2.0",
"phly/keep-a-changelog": "^2.11.0",
"php-http/curl-client": "^2.2.0",
"php-http/discovery": "^1.13.0",
"php-http/httplug": "^2.1.0",
"php-http/httplug": "^2.2.0",
"psr/http-client": "^1.0.1",
"psr/http-message": "^1.0.1",
"psr/log": "^1.1",
"symfony/console": "^4.4.10 || ^5.1.2",
"symfony/process": "^5.1.3",
"thecodingmachine/safe": "^v1.1.2",
"psr/log": "^1.1.3",
"symfony/console": "^5.2.1",
"symfony/process": "^5.2.1",
"thecodingmachine/safe": "^1.3.3",
"webmozart/assert": "^1.9.1"
},
"autoload-dev": {
Expand All @@ -33,12 +33,12 @@
}
},
"require-dev": {
"doctrine/coding-standard": "^8.1.0",
"infection/infection": "^0.17.5",
"phpunit/phpunit": "^9.2.5",
"psalm/plugin-phpunit": "^0.12.2",
"doctrine/coding-standard": "^8.2.0",
"phpunit/phpunit": "^9.5.0",
"psalm/plugin-phpunit": "^0.15.0",
"roave/infection-static-analysis-plugin": "^1.7",
"squizlabs/php_codesniffer": "^3.5.8",
"vimeo/psalm": "^3.18.2"
"vimeo/psalm": "^4.3.2"
},
"config": {
"sort-packages": true
Expand Down
Loading