Skip to content
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

Merge release 1.38.0 into 2.0.x #215

Merged
merged 33 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3edd862
Update sqlsrv extension to 5.11 and add PHP 8.2 support
MauricioFauth Aug 31, 2023
d5c9077
Merge pull request #175 from MauricioFauth/sqlsrv-82
boesing Oct 8, 2023
10a0ecd
Lock file maintenance
renovate[bot] Oct 9, 2023
0405146
Lock file maintenance
renovate[bot] Oct 16, 2023
395ec65
Lock file maintenance
renovate[bot] Oct 23, 2023
f9f92ad
Lock file maintenance
renovate[bot] Nov 13, 2023
7078370
Lock file maintenance
renovate[bot] Nov 20, 2023
1259d8d
Lock file maintenance
renovate[bot] Nov 27, 2023
f16ba07
Lock file maintenance
renovate[bot] Dec 4, 2023
e95b35c
Lock file maintenance
renovate[bot] Dec 11, 2023
52ec8ea
Lock file maintenance
renovate[bot] Dec 18, 2023
74a53ea
Lock file maintenance
renovate[bot] Dec 25, 2023
c77e690
Lock file maintenance
renovate[bot] Jan 1, 2024
68a106f
Lock file maintenance
renovate[bot] Jan 8, 2024
b3317ab
Make ext-bcmath available by default
Xerkus Jan 31, 2024
925c3ba
Merge pull request #213 from Xerkus/feature/bcmath-by-default
Xerkus Jan 31, 2024
3b2ede6
Lock file maintenance
renovate[bot] Jan 31, 2024
1048c12
Bump composer in container to 2.6.6
Xerkus Jan 31, 2024
14a5b00
Merge pull request #212 from laminas/renovate/lock-file-maintenance
Xerkus Jan 31, 2024
7138838
Add PHP 8.3 support for sqlsrv extension
MauricioFauth Jan 22, 2024
6fdc61e
Update sqlsrv release download links to use ubuntu2204 variants where…
Xerkus Jan 31, 2024
47605d2
qa: migrate nodejs installation to recommended by nodesource
boesing Oct 13, 2023
9e015a0
Add pipefail to dockerfile instructions
Xerkus Jan 31, 2024
d041993
Merge pull request #214 from Xerkus/feature/bump-composer
Xerkus Jan 31, 2024
90936ac
Merge pull request #197 from laminas/qa/migrate-nodejs-installation
Xerkus Jan 31, 2024
33821f8
Update dependency markdownlint-cli2 to v0.12.1
renovate[bot] Jan 31, 2024
5e0ed7b
Merge pull request #133 from laminas/renovate/all-minor-patch
Xerkus Jan 31, 2024
a9dd67c
Update README.md
gennadiylitvinyuk Apr 1, 2021
4901d14
Update README.md
gennadiylitvinyuk Apr 3, 2021
b6da79e
Add example with reusable workflow and mention possibility of duplica…
Xerkus Jan 31, 2024
7cd29f4
Apply suggestions from review
Xerkus Jan 31, 2024
8818806
Merge pull request #211 from MauricioFauth/sqlsrv-83
Xerkus Feb 1, 2024
ead082d
Merge pull request #18 from gennadiylitvinyuk/patch-1
Xerkus Feb 1, 2024
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
51 changes: 39 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
ARG NODE_MAJOR=20

# Aliasing base images, so we can change just this, when needing to upgrade or pull base layers
FROM ubuntu:22.04 AS base-distro
FROM composer:2.4.4 AS composer

FROM composer:2.6.6 AS composer

FROM base-distro AS install-markdownlint
ARG NODE_MAJOR
ENV NODE_MAJOR=$NODE_MAJOR

# Install system dependencies first - these don't change much
RUN export DEBIAN_FRONTEND=noninteractive \
&& (curl -ssL https://deb.nodesource.com/setup_20.x | bash -) \
RUN set -eux; \
export DEBIAN_FRONTEND=noninteractive \
&& apt update \
&& apt install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
&& mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt update \
&& apt install -y --no-install-recommends \
npm \
nodejs \
&& apt clean

COPY setup/markdownlint/package.json \
Expand All @@ -30,32 +41,39 @@ RUN cd /markdownlint \


FROM base-distro

ARG NODE_MAJOR
LABEL "repository"="http://github.com/laminas/laminas-continuous-integration-action"
LABEL "homepage"="http://github.com/laminas/laminas-continuous-integration-action"
LABEL "maintainer"="https://github.com/laminas/technical-steering-committee/"

ENV COMPOSER_HOME=/usr/local/share/composer \
DEBIAN_FRONTEND=noninteractive \
ACCEPT_EULA=Y
ACCEPT_EULA=Y \
NODE_MAJOR=$NODE_MAJOR

# This may look a bit long, but it's just a big `apt install` section, followed by a cleanup,
# so that we get a single compact layer, with not too many layer overwrites.
RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2) \
RUN set -eux; \
export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2) \
&& apt update \
&& apt upgrade -y \
&& apt install -y --no-install-recommends \
curl \
gpg-agent \
software-properties-common \
ca-certificates \
gnupg \
&& (curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg) \
&& add-apt-repository -y ppa:ondrej/php \
&& curl -sSL https://packages.microsoft.com/config/ubuntu/$OS_VERSION/prod.list | tee /etc/apt/sources.list.d/microsoft.list \
&& (curl -ssL https://deb.nodesource.com/setup_20.x | bash -) \
&& mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt update \
&& apt install -y --no-install-recommends \
# Base dependencies
git \
nodejs \
jq \
libxml2-utils \
libzip-dev \
Expand All @@ -70,6 +88,7 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2)
\
php-pear \
\
php5.6-bcmath \
php5.6-bz2 \
php5.6-cli \
php5.6-curl \
Expand All @@ -87,6 +106,7 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2)
php5.6-zip \
\
php7.0-cli \
php7.0-bcmath \
php7.0-bz2 \
php7.0-curl \
php7.0-dev \
Expand All @@ -103,6 +123,7 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2)
php7.0-zip \
\
php7.1-cli \
php7.1-bcmath \
php7.1-bz2 \
php7.1-curl \
php7.1-dev \
Expand All @@ -119,6 +140,7 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2)
php7.1-zip \
\
php7.2-cli \
php7.2-bcmath \
php7.2-bz2 \
php7.2-curl \
php7.2-dev \
Expand All @@ -135,6 +157,7 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2)
php7.2-zip \
\
php7.3-cli \
php7.3-bcmath \
php7.3-bz2 \
php7.3-curl \
php7.3-dev \
Expand All @@ -151,6 +174,7 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2)
php7.3-zip \
\
php7.4-cli \
php7.4-bcmath \
php7.4-bz2 \
php7.4-curl \
php7.4-dev \
Expand All @@ -167,6 +191,7 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2)
php7.4-zip \
\
php8.0-cli \
php8.0-bcmath \
php8.0-bz2 \
php8.0-curl \
php8.0-dev \
Expand All @@ -182,6 +207,7 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2)
php8.0-zip \
\
php8.1-cli \
php8.1-bcmath \
php8.1-bz2 \
php8.1-curl \
php8.1-dev \
Expand All @@ -197,6 +223,7 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2)
php8.1-zip \
\
php8.2-cli \
php8.2-bcmath \
php8.2-bz2 \
php8.2-curl \
php8.2-dev \
Expand All @@ -212,6 +239,7 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2)
php8.2-zip \
\
php8.3-cli \
php8.3-bcmath \
php8.3-bz2 \
php8.3-curl \
php8.3-dev \
Expand Down Expand Up @@ -264,16 +292,15 @@ COPY composer.json \
/tools/

# Set default PHP version based on the `composer.json` `config.platform.php` setting
RUN export DEFAULT_PHP_VERSION=$(jq -r '.config.platform.php | sub("(?<minor>[0-9.]).99$"; "\(.minor)")' /tools/composer.json) \
RUN set -eux; \
export DEFAULT_PHP_VERSION=$(jq -r '.config.platform.php | sub("(?<minor>[0-9.]).99$"; "\(.minor)")' /tools/composer.json) \
&& update-alternatives --set php /usr/bin/php$DEFAULT_PHP_VERSION \
&& update-alternatives --set phpize /usr/bin/phpize$DEFAULT_PHP_VERSION \
&& update-alternatives --set php-config /usr/bin/php-config$DEFAULT_PHP_VERSION \
&& update-alternatives --set phpdbg /usr/bin/phpdbg$DEFAULT_PHP_VERSION \
&& echo "DEFAULT_PHP_VERSION=${DEFAULT_PHP_VERSION}" >> /etc/environment

RUN cd /tools \
# Install `ext-bcmath` as it seems to be a requirement for `roave/backward-compatibility-check`
&& apt install -y php-bcmath \
&& composer install \
--classmap-authoritative \
# Cleanup composer files from external tools folder
Expand Down
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,16 @@ Generally speaking, you will use this in combination with the [laminas/laminas-c

## Usage

Create `.github/workflows/continuous-integration.yml` file with following content:

```yaml
name: "Continuous Integration"

on:
pull_request:
push:
branches:

jobs:
matrix:
name: Generate job matrix
Expand All @@ -70,7 +79,6 @@ jobs:
- name: Gather CI configuration
id: matrix
uses: laminas/laminas-ci-matrix-action@v1

qa:
name: QA Checks
needs: [matrix]
Expand All @@ -87,6 +95,27 @@ jobs:
job: ${{ matrix.job }}
```

The same can be achieved with our reusable workflow:

```yaml
name: "Continuous Integration"

on:
pull_request:
push:
branches:

jobs:
ci:
uses: laminas/workflow-continuous-integration/.github/workflows/[email protected]
```

> ### Duplicate CI runs
>
> When pull requests are opened from branches in the same repository, the CI pipeline could run twice for the same commit: once when pushed to a branch and once when the PR is opened.
> Workflow triggers can be adjusted to only run for specific branches or to skip branches using simple glob patterns.
> See the GitHub documentation for [Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-workflow-only-when-a-push-to-specific-branches-occurs) for more info.

> ### actions/checkout not required
>
> The action will perform a checkout of the repository at the requested reference as part of its work, and therefore does not require the actions/checkout action as a preceding step.
Expand Down Expand Up @@ -219,7 +248,7 @@ The tricks to remember are:
As an example, if you wanted to run the CS checks under PHP 7.4 using locked dependencies, you could do something like the following:

```bash
$ docker run -v $(realpath .):/github/workspace -w=/github/workspace laminas-check-runner:latest '{"php":"7.4","dependencies":"locked","extensions":[],"ini":["memory_limit=-1"],"command":"./vendor/bin/phpcs"}'
$ docker run -v $(realpath .):/github/workspace -w=/github/workspace ghcr.io/laminas/laminas-continuous-integration:1 '{"php":"7.4","dependencies":"locked","extensions":[],"ini":["memory_limit=-1"],"command":"./vendor/bin/phpcs"}'
```

The trick to remember: the job JSON should generally be in single quotes, to allow the `"` characters used to delimit properties and strings in the JSON to not cause interpolation issues.
Expand Down
Loading
Loading